1992 and 1994 t/perl/regexp.t subtests fail with pcre2-10.30-RC1
ppisar opened this issue · comments
PCRE2 authors released a release candidate 1 for 10.30 version and re-engine-PCRE2-0.13 fails two subtests since upgrading to the version:
$ perl -Iblib/{lib,arch} t/perl/regexp.t
[...]
ok 1991
not ok 1992 () /(?x:[a b])/xx:\N{SPACE}:yS:$&: => `S', match=
$subject = " ";
$got = "S";
;
$match = ($subject =~ m/(?x:[a b])/xx) while $c--;
$got = "$&";
ok 1993
not ok 1994 () /(?x)[a b]/xx:\N{SPACE}:yS:$&: => `S', match=
$subject = " ";
$got = "S";
;
$match = ($subject =~ m/(?x)[a b]/xx) while $c--;
$got = "$&";
ok 1995
ok 1996
I incidently already fixed this today, and I'm just smoking the release candidate.
Eh, I didn't really fix it, just marked it as TODO in the 0.14 release.
Will look at it later. It was my PCRE patch which changed this I believe.
I think this a bug in the new PCRE2. PCRE2 fails to match:
$ pcre2test
PCRE2 version 10.30-RC1 2017-07-18
re> /(?x:[a b])/xx
data> " "
No match
Perl 5.26.0 matches:
$ perl -E 'say q{MATCH} if q{ } =~ /(?x:[a b])/xx'
MATCH
If I understand perlre POD, correctly, it should match because the inner switch (?x) is applied after the outer switch /xx. I will report it to the PCRE2 authors.
Yes, it was my fault. I wrote the /xx patch. This should be fixed in RC2
Fixed in the proper subsequent pcre2 release.