diff options
Diffstat (limited to 'ext/pcre/pcrelib/testdata/testoutput2')
-rw-r--r-- | ext/pcre/pcrelib/testdata/testoutput2 | 211 |
1 files changed, 208 insertions, 3 deletions
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2 index 30ea63b9c..c29bd5fd3 100644 --- a/ext/pcre/pcrelib/testdata/testoutput2 +++ b/ext/pcre/pcrelib/testdata/testoutput2 @@ -857,7 +857,7 @@ No match a No match -/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I +/This one is here because Perl behaves differently; see also the following/I Capturing subpattern count = 0 No options First char = 'T' @@ -869,9 +869,34 @@ Max back reference = 1 Options: anchored No first char No need char + aaaa +No match aaaaaa - 0: aaaaaa - 1: aa +No match + +/Perl does not fail these two for the final subjects. Neither did PCRE until/ +/release 8.01. The problem is in backtracking into a subpattern that contains/ +No match +/a recursive reference to itself. PCRE has now made these into atomic patterns./ +No match + +/^(xa|=?\1a){2}$/ + xa=xaa + 0: xa=xaa + 1: =xaa + ** Failers +No match + xa=xaaa +No match + +/^(xa|=?\1a)+$/ + xa=xaa + 0: xa=xaa + 1: =xaa + ** Failers +No match + xa=xaaa +No match /These are syntax tests from Perl 5.005/I Capturing subpattern count = 0 @@ -10463,4 +10488,184 @@ No set of starting bytes cat No match +/i(?(DEFINE)(?<s>a))/SI +Capturing subpattern count = 1 +Named capturing subpatterns: + s 1 +No options +First char = 'i' +No need char +Subject length lower bound = 1 +No set of starting bytes + i + 0: i + +/()i(?(1)a)/SI +Capturing subpattern count = 1 +No options +No first char +Need char = 'i' +Subject length lower bound = 1 +Starting byte set: i + ia + 0: ia + 1: + +/(?i)a(?-i)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 00 Opt + b + Alt + 00 Opt + c + Ket + End +------------------------------------------------------------------ + XabX + 0: ab + XAbX + 0: Ab + CcC + 0: c + ** Failers +No match + XABX +No match + +/(?i)a(?s)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 05 Opt + NC b + Alt + 05 Opt + NC c + Ket + End +------------------------------------------------------------------ + +/(?i)a(?s-i)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 04 Opt + b + Alt + 04 Opt + c + Ket + End +------------------------------------------------------------------ + +/^(ab(c\1)d|x){2}$/BZ +------------------------------------------------------------------ + Bra + ^ + Once + CBra 1 + ab + CBra 2 + c + \1 + Ket + d + Alt + x + Ket + Ket + Once + CBra 1 + ab + CBra 2 + c + \1 + Ket + d + Alt + x + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + xabcxd + 0: xabcxd + 1: abcxd + 2: cx + +/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ +------------------------------------------------------------------ + Bra + ^ + Once + Brazero + Once + Recurse + KetRmax + Ket + Cond + Cond def + CBra 1 + Any + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + +/^(?&t)*(?(DEFINE)(?<t>.))$/BZ +------------------------------------------------------------------ + Bra + ^ + Brazero + Once + Recurse + KetRmax + Cond + Cond def + CBra 1 + Any + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + +/ -- The first four of these are not in the Perl 5.10 test because Perl + documents that the use of \K in assertions is "not well defined". The + last is here because Perl gives the match as "b" rather than "ab". I + believe this to be a Perl bug. --/ + +/(?=a\Kb)ab/ + ab + 0: b + +/(?!a\Kb)ac/ + ac + 0: ac + +/^abc(?<=b\Kc)d/ + abcd + 0: cd + +/^abc(?<!b\Kq)d/ + abcd + 0: abcd + +/(?>a\Kb)z|(ab)/ + ab + 0: ab + 1: ab + +/----------------------/ + +/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ +Failed: recursive call could loop indefinitely at offset 31 + /-- End of testinput2 --/ |