Skip to content

Commit

Permalink
[String] Skip a test when an issue is detected in PCRE2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Dec 9, 2023
1 parent 91bf445 commit e3f98bf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Tests/AbstractUnicodeTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,21 @@ public function testCodePointsAt(array $expected, string $string, int $offset, i

public static function provideCodePointsAt(): array
{
return [
$data = [
[[], '', 0],
[[], 'a', 1],
[[0x53], 'Späßchen', 0],
[[0xE4], 'Späßchen', 2],
[[0xDF], 'Späßchen', -5],
[[0x260E], '☢☎❄', 1],
];

// Skip this set if we encounter an issue in PCRE2
// @see https://github.com/PCRE2Project/pcre2/issues/361
if (3 === grapheme_strlen('☢☎❄')) {
$data[] = [[0x260E], '☢☎❄', 1];
}

return $data;
}

public static function provideLength(): array
Expand Down

0 comments on commit e3f98bf

Please sign in to comment.