--- embedaddon/pcre/testdata/testinput2 2012/10/09 09:19:18 1.1.1.3 +++ embedaddon/pcre/testdata/testinput2 2013/07/22 08:25:57 1.1.1.4 @@ -313,12 +313,6 @@ *** Failers fooabar -/This one is here because Perl 5.005_02 doesn't fail it/I - -/^(a)?(?(1)a|b)+$/I - *** Failers - a - /This one is here because Perl behaves differently; see also the following/I /^(a\1?){4}$/I @@ -2939,7 +2933,7 @@ a random value. /Ix xxxxabcde\P xxxxabcde\P\P -/-- This is not in the Perl >= 5.10 test because Perl seems currently to be +/-- This is not in the Perl-compatible test because Perl seems currently to be broken and not behaving as specified in that it *does* bumpalong after hitting (*COMMIT). --/ @@ -2985,28 +2979,12 @@ a random value. /Ix /^(?&t)*(?(DEFINE)(?.))$/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 +/ -- This one 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(?a\Kb)z|(ab)/ ab -/----------------------/ - /(?P(?P0|)|(?P>L2)(?P>L1))/ /abc(*MARK:)pqr/ @@ -3021,7 +2999,7 @@ a random value. /Ix /A(*COMMIT)B/+K ACABX -/--- These should be different, but in Perl 5.11 are not, which I think +/--- These should be different, but in Perl they are not, which I think is a bug in Perl. ---/ /A(*THEN)B|A(*THEN)C/K @@ -3030,12 +3008,6 @@ a random value. /Ix /A(*PRUNE)B|A(*PRUNE)C/K AC -/--- This should fail; the SKIP advances by one, but when we get to AC, the - PRUNE kills it. Perl behaves differently. ---/ - -/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK - AAAC - /--- Mark names can be duplicated. Perl doesn't give a mark for this one, though PCRE does. ---/ @@ -3061,7 +3033,7 @@ with \Y. ---/ /^(ab (c+(*FAIL)cd) | xyz)/x abcccd -/--- Perl 5.11 gets some of these wrong ---/ +/--- Perl gets some of these wrong ---/ /(?>.(*ACCEPT))*?5/ abcde @@ -3121,14 +3093,6 @@ with \Y. ---/ /X\H++\R/BZ X\x0d\x0a -/-- Perl treats this one differently, not failing the second string. I believe - that is a bug in Perl. --/ - -/^((abc|abcx)(*THEN)y|abcd)/ - abcd - *** Failers - abcxy - /(?<=abc)def/ abc\P\P @@ -3427,7 +3391,7 @@ with \Y. ---/ /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|a+)(?>(z+))\w/BZ aaaazzzzb ** Failers @@ -3751,22 +3669,172 @@ replaced by single letters. --/ \r\r\r\P \r\r\r\P\P -/-- These two are here because Perl does not match: it seems to allow the -COMMIT to escape from the assertion. --/ +"AB(C(D))(E(F))?(?(?=\2)(?=\4))" + ABCDGHI\O03 + +/-- These are all run as real matches in test 1; here we are just checking the +settings of the anchored and startline bits. --/ -/(?=a(*COMMIT)b|ac)ac|ac/ - ac +/(?>.*?a)(?<=ba)/I -/(?=a(*COMMIT)b|(ac)) ac | (a)c/x - ac +/(?:.*?a)(?<=ba)/I -"AB(C(D))(E(F))?(?(?=\2)(?=\4))" - ABCDGHI\O03 +/.*?a(*PRUNE)b/I + +/.*?a(*PRUNE)b/sI + +/^a(*PRUNE)b/sI + +/.*?a(*SKIP)b/I + +/(?>.*?a)b/sI + +/(?>.*?a)b/I + +/(?>^a)b/sI + +/(?>.*?)(?<=(abcd)|(wxyz))/I + +/(?>.*)(?<=(abcd)|(wxyz))/I + +"(?>.*)foo"I + +"(?>.*?)foo"I + +/(?>^abc)/mI + +/(?>.*abc)/mI + +/(?:.*abc)/mI + +/-- Check PCRE_STUDY_EXTRA_NEEDED --/ + +/.?/S-I + +/.?/S!I + +/(?:(a)+(?C1)bb|aa(?C2)b)/ + aab\C+ + +/(?:(a)++(?C1)bb|aa(?C2)b)/ + aab\C+ -/-- This one is here because Perl does not confine the *COMMIT to the -assertion, and therefore fails the entire subroutine call. --/ +/(?:(?>(a))(?C1)bb|aa(?C2)b)/ + aab\C+ + +/(?:(?1)(?C1)x|ab(?C2))((a)){0}/ + aab\C+ + +/(?1)(?C1)((a)(?C2)){0}/ + aab\C+ + +/(?:(a)+(?C1)bb|aa(?C2)b)++/ + aab\C+ + aab\C+\O2 + +/(ab)x|ab/ + ab\O3 + ab\O2 + +/(ab)/ + ab\O3 + ab\O2 -/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/ - ac +/(?<=123)(*MARK:xx)abc/K + xxxx123a\P\P + xxxx123a\P + +/123\Kabc/ + xxxx123a\P\P + xxxx123a\P + +/^(?(?=a)aa|bb)/C + bb + +/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/ + bb + +/-- Perl seems to have a bug with this one --/ + +/aaaaa(*COMMIT)(*PRUNE)b|a+c/ + aaaaaac + +/-- Here are some that Perl treats differently because of the way it handles +backtracking verbs. --/ + + /(?!a(*COMMIT)b)ac|ad/ + ac + ad + +/^(?!a(*THEN)b|ac)../ + ac + ad + +/^(?=a(*THEN)b|ac)/ + ac + +/\A.*?(?:a|b(*THEN)c)/ + ba + +/\A.*?(?:a|b(*THEN)c)++/ + ba + +/\A.*?(?:a|b(*THEN)c|d)/ + ba + +/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/ + aac + +/\A.*?(a|b(*THEN)c)/ + ba + +/^(A(*THEN)B|A(*THEN)D)/ + AD + +/(?!b(*THEN)a)bn|bnn/ + bnn + +/(?(?=b(*SKIP)a)bn|bnn)/ + bnn + +/(?=b(*THEN)a|)bn|bnn/ + bnn + +/-------------------------/ + +/(*LIMIT_MATCH=12bc)abc/ + +/(*LIMIT_MATCH=4294967290)abc/ + +/(*LIMIT_RECURSION=4294967280)abc/I + +/(a+)*zz/ + aaaaaaaaaaaaaz + aaaaaaaaaaaaaz\q3000 + +/(a+)*zz/S- + aaaaaaaaaaaaaz\Q10 + +/(*LIMIT_MATCH=3000)(a+)*zz/I + aaaaaaaaaaaaaz + aaaaaaaaaaaaaz\q60000 + +/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I + aaaaaaaaaaaaaz + +/(*LIMIT_MATCH=60000)(a+)*zz/I + aaaaaaaaaaaaaz + aaaaaaaaaaaaaz\q3000 + +/(*LIMIT_RECURSION=10)(a+)*zz/IS- + aaaaaaaaaaaaaz + aaaaaaaaaaaaaz\Q1000 + +/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS- + aaaaaaaaaaaaaz + +/(*LIMIT_RECURSION=1000)(a+)*zz/IS- + aaaaaaaaaaaaaz + aaaaaaaaaaaaaz\Q10 /-- End of testinput2 --/