8000 minor #52959 [String] Skip a test when an issue is detected in PCRE2 … · symfony/symfony@52839be · GitHub
[go: up one dir, main page]

Skip to content

Commit 52839be

Browse files
committed
minor #52959 [String] Skip a test when an issue is detected in PCRE2 (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [String] Skip a test when an issue is detected in PCRE2 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Part of #52206 | License | MIT I propose to ignore this test when [this issue of PCRE2](PCRE2Project/pcre2#361) is detected until it's resolved and the polyfill updated. Commits ------- bf66274 [String] Skip a test when an issue is detected in PCRE2
2 parents ff864b1 + bf66274 commit 52839be

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,21 @@ public function testCodePointsAt(array $expected, string $string, int $offset, i
9494

9595
public static function provideCodePointsAt(): array
9696
{
97-
return [
97+
$data = [
9898
[[], '', 0],
9999
[[], 'a', 1],
100100
[[0x53], 'Späßchen', 0],
101101
[[0xE4], 'Späßchen', 2],
102102
[[0xDF], 'Späßchen', -5],
103-
[[0x260E], '☢☎❄', 1],
104103
];
104+
105+
// Skip this set if we encounter an issue in PCRE2
106+
// @see https://github.com/PCRE2Project/pcre2/issues/361
107+
if (3 === grapheme_strlen('☢☎❄')) {
108+
$data[] = [[0x260E], '☢☎❄', 1];
109+
}
110+
111+
return $data;
105112
}
106113

107114
public static function provideLength(): array

0 commit comments

Comments
 (0)
0