Skip to content

Commit 2adaf41

Browse files
committed
skip a test case that doesn't work with PCRE < 10.40
1 parent a219124 commit 2adaf41

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Tests/AbstractUnicodeTestCase.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,22 @@ abstract class AbstractUnicodeTestCase extends AbstractAsciiTestCase
1717
{
1818
public static function provideWidth(): array
1919
{
20-
return array_merge(
21-
parent::provideWidth(),
22-
[
23-
[1, ''],
24-
[2, '⚠️'],
25-
[2, '1️⃣'],
26-
[14, '<<<END
20+
$unicodeWidthTests = [
21+
[1, ''],
22+
[2, '⚠️'],
23+
[14, '<<<END
2724
This is a
2825
multiline text
2926
END'],
30-
]
27+
];
28+
29+
if (\PCRE_VERSION_MAJOR > 10 || \PCRE_VERSION_MAJOR === 10 && \PCRE_VERSION_MINOR >= 40) {
30+
$unicodeWidthTests[] = [2, '1️⃣'];
31+
}
32+
33+
return array_merge(
34+
parent::provideWidth(),
35+
$unicodeWidthTests
3136
);
3237
}
3338

0 commit comments

Comments
 (0)