diff options
Diffstat (limited to 'ext/pcre/pcrelib/testdata/testinput2')
-rw-r--r-- | ext/pcre/pcrelib/testdata/testinput2 | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2 index 3319bb732..94a18c9a4 100644 --- a/ext/pcre/pcrelib/testdata/testinput2 +++ b/ext/pcre/pcrelib/testdata/testinput2 @@ -344,10 +344,25 @@ *** Failers a -/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 /^(a\1?){4}$/I + aaaa aaaaaa + +/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/ +/a recursive reference to itself. PCRE has now made these into atomic patterns./ + +/^(xa|=?\1a){2}$/ + xa=xaa + ** Failers + xa=xaaa + +/^(xa|=?\1a)+$/ + xa=xaa + ** Failers + xa=xaaa /These are syntax tests from Perl 5.005/I @@ -3169,4 +3184,52 @@ a random value. /Ix /(\3)(\1)(a)/SI cat +/i(?(DEFINE)(?<s>a))/SI + i + +/()i(?(1)a)/SI + ia + +/(?i)a(?-i)b|c/BZ + XabX + XAbX + CcC + ** Failers + XABX + +/(?i)a(?s)b|c/BZ + +/(?i)a(?s-i)b|c/BZ + +/^(ab(c\1)d|x){2}$/BZ + xabcxd + +/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ + +/^(?&t)*(?(DEFINE)(?<t>.))$/BZ + +/ -- 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 + +/(?!a\Kb)ac/ + ac + +/^abc(?<=b\Kc)d/ + abcd + +/^abc(?<!b\Kq)d/ + abcd + +/(?>a\Kb)z|(ab)/ + ab + +/----------------------/ + +/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ + /-- End of testinput2 --/ |