Skip to content

Commit cfd8972

Browse files
committed
ext/pcre/tests: support libpcre2-10.47
In the latest version of libpcre2, the offsets appearing in some "compilation failed" warnings have increased by one. (I have not investigated why.) This is causing spurious test failures, so in this commit we replace the hard-coded offsets by %d to match any integer. Gentoo-bug: https://bugs.gentoo.org/965018
1 parent 51edaac commit cfd8972

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/pcre/tests/grep2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var_dump(preg_last_error() == PREG_RECURSION_LIMIT_ERROR);
2121

2222
?>
2323
--EXPECTF--
24-
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line %d
24+
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset %d in %sgrep2.php on line %d
2525
bool(false)
2626
array(3) {
2727
[5]=>

ext/pcre/tests/pcre_extra.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var_dump(preg_match('/\y/X', '\y'));
88

99
?>
1010
--EXPECTF--
11-
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 1 in %spcre_extra.php on line 3
11+
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset %d in %spcre_extra.php on line 3
1212
bool(false)
1313

14-
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 1 in %spcre_extra.php on line 4
14+
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset %d in %spcre_extra.php on line 4
1515
bool(false)

ext/pcre/tests/split.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var_dump(preg_split('/\d*/', 'ab2c3u', -1, PREG_SPLIT_NO_EMPTY));
1616

1717
?>
1818
--EXPECTF--
19-
Warning: preg_split(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %ssplit.php on line %d
19+
Warning: preg_split(): Compilation failed: quantifier does not follow a repeatable item at offset %d in %ssplit.php on line %d
2020
bool(false)
2121
array(3) {
2222
[0]=>

0 commit comments

Comments
 (0)