From 96771f40a9695dc5fd44e6d4d425b637704a8b2e Mon Sep 17 00:00:00 2001 From: ph10 Date: Sun, 16 Apr 2017 13:03:30 +0000 Subject: Improve testing coverage with updates to pcre2test and test files; also get rid of redundant code in pcre2_match(). git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@751 6239d852-aaf2-0410-a92c-79f79f948069 --- testdata/testoutput5 | 743 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 544 insertions(+), 199 deletions(-) (limited to 'testdata/testoutput5') diff --git a/testdata/testoutput5 b/testdata/testoutput5 index 26f9569..091b06a 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -16,7 +16,7 @@ \= Expect no match \x{061c} No match - + /^[[:graph:]]+$/utf,ucp \= Expect no match \x{61c} @@ -54,14 +54,14 @@ No match 0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} \x{2068}\x{2069} 0: \x{2068}\x{2069} - + # Perl does not consider U+180e to be a space character. It is true that it # does not appear in the Unicode PropList.txt file as such, but in many other # sources it is listed as a space, and has been treated as such in PCRE for -# a long time. +# a long time. /^>[[:blank:]]*/utf,ucp - >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028} + >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028} 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09} /^A\s+Z/utf,ucp @@ -73,7 +73,7 @@ No match 0: A\x{2005}Z A\x{85}\x{2005}Z 0: A\x{85}\x{2005}Z - + /^[[:graph:]]+$/utf,ucp \= Expect no match \x{180e} @@ -152,7 +152,7 @@ Last code unit = '.' Subject length lower bound = 4 \x{0041}\x{2262}\x{0391}\x{002e} 0: A\x{2262}\x{391}. - + /.{3,5}X/IB,utf ------------------------------------------------------------------ Bra @@ -202,7 +202,7 @@ Subject length lower bound = 1 No match \x{ff} No match - \x{100} + \x{100} No match /^[^ab]/IB,utf @@ -221,32 +221,32 @@ Subject length lower bound = 1 0: c \x{ff} 0: \x{ff} - \x{100} + \x{100} 0: \x{100} -\= Expect no match +\= Expect no match aaa No match - + /\x{100}*(\d+|"(?1)")/utf 1234 0: 1234 1: 1234 - "1234" + "1234" 0: "1234" 1: "1234" \x{100}1234 0: \x{100}1234 1: 1234 - "\x{100}1234" + "\x{100}1234" 0: \x{100}1234 1: 1234 - \x{100}\x{100}12ab + \x{100}\x{100}12ab 0: \x{100}\x{100}12 1: 12 - \x{100}\x{100}"12" + \x{100}\x{100}"12" 0: \x{100}\x{100}"12" 1: "12" -\= Expect no match +\= Expect no match \x{100}\x{100}abcd No match @@ -300,7 +300,7 @@ Failed: error 108 at offset 15: range out of order in character class \= Expect no match \x{105} No match - \x{ff} + \x{ff} No match /[\xFF]/IB @@ -331,23 +331,23 @@ Subject length lower bound = 1 0: \x{d6} \x{d6} 0: \x{d6} - + /[Ä-Ü]/utf Ö <-- Same with Study 0: \x{d6} \x{d6} 0: \x{d6} - + /[\x{c4}-\x{dc}]/utf Ö # Matches without Study 0: \x{d6} - \x{d6} + \x{d6} 0: \x{d6} /[\x{c4}-\x{dc}]/utf Ö <-- Same with Study 0: \x{d6} - \x{d6} + \x{d6} 0: \x{d6} /[^\x{100}]abc(xyz(?1))/IB,utf @@ -472,11 +472,11 @@ Subject length lower bound = 0 /\W/utf A.B 0: . - A\x{100}B + A\x{100}B 0: \x{100} - + /\w/utf - \x{100}X + \x{100}X 0: X /^\ሴ/IB,utf @@ -497,7 +497,7 @@ Subject length lower bound = 1 ()()()()()()()()()() ()()()()()()()()()() A (x) (?41) B/x,utf - AxxB + AxxB Matched, but too many substrings 0: AxxB 1: @@ -568,14 +568,14 @@ Matched, but too many substrings 0: a\x{0b}b a\x0cb 0: a\x{0c}b - a\x{85}b + a\x{85}b 0: a\x{85}b - a\x{2028}b + a\x{2028}b 0: a\x{2028}b - a\x{2029}b + a\x{2029}b 0: a\x{2029}b \= Expect no match - a\n\rb + a\n\rb No match /^a\R*b/bsr=unicode,utf @@ -591,11 +591,11 @@ No match 0: a\x{0b}b a\x0c\x{2028}\x{2029}b 0: a\x{0c}\x{2028}\x{2029}b - a\x{85}b + a\x{85}b 0: a\x{85}b - a\n\rb + a\n\rb 0: a\x{0a}\x{0d}b - a\n\r\x{85}\x0cb + a\n\r\x{85}\x0cb 0: a\x{0a}\x{0d}\x{85}\x{0c}b /^a\R+b/bsr=unicode,utf @@ -609,14 +609,14 @@ No match 0: a\x{0b}b a\x0c\x{2028}\x{2029}b 0: a\x{0c}\x{2028}\x{2029}b - a\x{85}b + a\x{85}b 0: a\x{85}b - a\n\rb + a\n\rb 0: a\x{0a}\x{0d}b - a\n\r\x{85}\x0cb + a\n\r\x{85}\x0cb 0: a\x{0a}\x{0d}\x{85}\x{0c}b \= Expect no match - ab + ab No match /^a\R{1,3}b/bsr=unicode,utf @@ -626,13 +626,13 @@ No match 0: a\x{0a}\x{0d}b a\n\r\x{85}b 0: a\x{0a}\x{0d}\x{85}b - a\r\n\r\nb + a\r\n\r\nb 0: a\x{0d}\x{0a}\x{0d}\x{0a}b - a\r\n\r\n\r\nb + a\r\n\r\n\r\nb 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b a\n\r\n\rb 0: a\x{0a}\x{0d}\x{0a}\x{0d}b - a\n\n\r\nb + a\n\n\r\nb 0: a\x{0a}\x{0a}\x{0d}\x{0a}b \= Expect no match a\n\n\n\rb @@ -646,9 +646,9 @@ No match X\x09X\x0b 0: X\x{09}X\x{0b} \= Expect no match - \x{a0} X\x0a + \x{a0} X\x0a No match - + /\H*\h+\V?\v{3,4}/utf \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d} @@ -656,19 +656,19 @@ No match 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d} \x09\x20\x{a0}\x0a\x0b\x0c 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c} -\= Expect no match +\= Expect no match \x09\x20\x{a0}\x0a\x0b No match - + /\H\h\V\v/utf \x{3001}\x{3000}\x{2030}\x{2028} 0: \x{3001}\x{3000}\x{2030}\x{2028} X\x{180e}X\x{85} 0: X\x{180e}X\x{85} \= Expect no match - \x{2009} X\x0a + \x{2009} X\x0a No match - + /\H*\h+\V?\v{3,4}/utf \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d} @@ -676,10 +676,10 @@ No match 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028} \x09\x20\x{202f}\x0a\x0b\x0c 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c} -\= Expect no match +\= Expect no match \x09\x{200a}\x{a0}\x{2028}\x0b No match - + /[\h]/B,utf ------------------------------------------------------------------ Bra @@ -725,9 +725,9 @@ No match ------------------------------------------------------------------ /.*$/newline=any,utf - \x{1ec5} + \x{1ec5} 0: \x{1ec5} - + /a\Rb/I,bsr=anycrlf,utf Capturing subpattern count = 0 Options: utf @@ -744,7 +744,7 @@ Subject length lower bound = 3 \= Expect no match a\x{85}b No match - a\x0bb + a\x0bb No match /a\Rb/I,bsr=unicode,utf @@ -762,9 +762,9 @@ Subject length lower bound = 3 0: a\x{0d}\x{0a}b a\x{85}b 0: a\x{85}b - a\x0bb + a\x0bb 0: a\x{0b}b - + /a\R?b/I,bsr=anycrlf,utf Capturing subpattern count = 0 Options: utf @@ -781,7 +781,7 @@ Subject length lower bound = 2 \= Expect no match a\x{85}b No match - a\x0bb + a\x0bb No match /a\R?b/I,bsr=unicode,utf @@ -799,16 +799,16 @@ Subject length lower bound = 2 0: a\x{0d}\x{0a}b a\x{85}b 0: a\x{85}b - a\x0bb + a\x0bb 0: a\x{0b}b - + /.*a.*=.b.*/utf,newline=any QQQ\x{2029}ABCaXYZ=!bPQR 0: ABCaXYZ=!bPQR \= Expect no match a\x{2029}b No match - \x61\xe2\x80\xa9\x62 + \x61\xe2\x80\xa9\x62 No match /[[:a\x{100}b:]]/utf @@ -817,19 +817,19 @@ Failed: error 130 at offset 3: unknown POSIX class name /a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref a\x{1234}b 0: a\x{1234}b - a\nb + a\nb 0: a\x{0a}b \= Expect no match - ab + ab No match - + /a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref aXb 0: aXb - a\nX\nX\x{1234}b + a\nX\nX\x{1234}b 0: a\x{0a}X\x{0a}X\x{1234}b \= Expect no match - ab + ab No match /(\x{de})\1/ @@ -852,7 +852,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /Xa{2,4}?b/utf X\=ps Partial match: X @@ -864,7 +864,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /Xa{2,4}+b/utf X\=ps Partial match: X @@ -876,7 +876,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /X\x{123}{2,4}b/utf X\=ps Partial match: X @@ -888,7 +888,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X\x{123}{2,4}?b/utf X\=ps Partial match: X @@ -900,7 +900,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X\x{123}{2,4}+b/utf X\=ps Partial match: X @@ -912,7 +912,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X\x{123}{2,4}b/utf \= Expect no match Xx\=ps @@ -925,7 +925,7 @@ No match No match X\x{123}\x{123}\x{123}\x{123}x\=ps No match - + /X\x{123}{2,4}?b/utf \= Expect no match Xx\=ps @@ -938,7 +938,7 @@ No match No match X\x{123}\x{123}\x{123}\x{123}x\=ps No match - + /X\x{123}{2,4}+b/utf \= Expect no match Xx\=ps @@ -951,7 +951,7 @@ No match No match X\x{123}\x{123}\x{123}\x{123}x\=ps No match - + /X\d{2,4}b/utf X\=ps Partial match: X @@ -963,7 +963,7 @@ Partial match: X33 Partial match: X333 X3333\=ps Partial match: X3333 - + /X\d{2,4}?b/utf X\=ps Partial match: X @@ -975,7 +975,7 @@ Partial match: X33 Partial match: X333 X3333\=ps Partial match: X3333 - + /X\d{2,4}+b/utf X\=ps Partial match: X @@ -999,7 +999,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /X\D{2,4}?b/utf X\=ps Partial match: X @@ -1011,7 +1011,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /X\D{2,4}+b/utf X\=ps Partial match: X @@ -1035,7 +1035,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X\D{2,4}?b/utf X\=ps Partial match: X @@ -1047,7 +1047,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X\D{2,4}+b/utf X\=ps Partial match: X @@ -1071,7 +1071,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /X[abc]{2,4}?b/utf X\=ps Partial match: X @@ -1083,7 +1083,7 @@ Partial match: Xaa Partial match: Xaaa Xaaaa\=ps Partial match: Xaaaa - + /X[abc]{2,4}+b/utf X\=ps Partial match: X @@ -1107,7 +1107,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X[abc\x{123}]{2,4}?b/utf X\=ps Partial match: X @@ -1119,7 +1119,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X[abc\x{123}]{2,4}+b/utf X\=ps Partial match: X @@ -1143,7 +1143,7 @@ Partial match: Xzz Partial match: Xzzz Xzzzz\=ps Partial match: Xzzzz - + /X[^a]{2,4}?b/utf X\=ps Partial match: X @@ -1155,7 +1155,7 @@ Partial match: Xzz Partial match: Xzzz Xzzzz\=ps Partial match: Xzzzz - + /X[^a]{2,4}+b/utf X\=ps Partial match: X @@ -1179,7 +1179,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X[^a]{2,4}?b/utf X\=ps Partial match: X @@ -1191,7 +1191,7 @@ Partial match: X\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123} X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: X\x{123}\x{123}\x{123}\x{123} - + /X[^a]{2,4}+b/utf X\=ps Partial match: X @@ -1215,7 +1215,7 @@ Partial match: YXYY Partial match: YXYYY YXYYYY\=ps Partial match: YXYYYY - + /(Y)X\1{2,4}?b/utf YX\=ps Partial match: YX @@ -1227,7 +1227,7 @@ Partial match: YXYY Partial match: YXYYY YXYYYY\=ps Partial match: YXYYYY - + /(Y)X\1{2,4}+b/utf YX\=ps Partial match: YX @@ -1251,7 +1251,7 @@ Partial match: \x{123}X\x{123}\x{123} Partial match: \x{123}X\x{123}\x{123}\x{123} \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123} - + /(\x{123})X\1{2,4}?b/utf \x{123}X\=ps Partial match: \x{123}X @@ -1263,7 +1263,7 @@ Partial match: \x{123}X\x{123}\x{123} Partial match: \x{123}X\x{123}\x{123}\x{123} \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123} - + /(\x{123})X\1{2,4}+b/utf \x{123}X\=ps Partial match: \x{123}X @@ -1328,7 +1328,7 @@ Partial match: X 0: \x{a0}xxx\x{85} /\S \S/utf,tables=2 - \x{a2} \x{84} + \x{a2} \x{84} 0: \x{a2} \x{84} 'A#хц'Bx,newline=any,utf @@ -1347,7 +1347,7 @@ Partial match: X Ket End ------------------------------------------------------------------ - + /a+#хaa z#XX?/Bx,newline=any,utf ------------------------------------------------------------------ @@ -1400,11 +1400,11 @@ Failed: error 168 at offset 3: \c must be followed by a printable ASCII characte 0: \x{0d} 1: 2: \x{0d} - \r\r\n\n\r + \r\r\n\n\r 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d} 1: \x{0d}\x{0d}\x{0a}\x{0a} 2: \x{0d} - \r\r\n\n\r\n + \r\r\n\n\r\n 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d} 1: \x{0d}\x{0d}\x{0a}\x{0a} 2: \x{0d} @@ -1414,11 +1414,11 @@ Failed: error 168 at offset 3: \c must be followed by a printable ASCII characte 0: \x{0d} 1: 2: \x{0d} - \r\r\n\n\r + \r\r\n\n\r 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d} 1: \x{0a} 2: \x{0d} - \r\r\n\n\r\n + \r\r\n\n\r\n 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d} 1: \x{0a} 2: \x{0d} @@ -1458,7 +1458,7 @@ Partial match: for /f.*/s,utf for\=ph Partial match: for - + /\x{d7ff}\x{e000}/utf /\x{d800}/utf @@ -1633,7 +1633,7 @@ Partial match: abaBabA 0: \x{0d} \r\=ph Partial match: \x{0d} - + /.{2,3}/utf,newline=crlf \r\=ps Partial match: \x{0d} @@ -1855,10 +1855,10 @@ Subject length lower bound = 1 0: 1234 12-34 0: 12-34 - 12+\x{661}-34 + 12+\x{661}-34 0: 12+\x{661}-34 \= Expect no match - abcd + abcd No match /(?:[\PPa*]*){8,}/ @@ -1927,7 +1927,7 @@ No match 0: \x{2028}\x{2028} \x{2028}\x{2028}\x{2028} 0: \x{2028}\x{2028}\x{2028} - + /\p{Zl}/B,utf ------------------------------------------------------------------ Bra @@ -1978,9 +1978,9 @@ No match \x{dfff}\=no_utf_check 0: \x{dfff} \= Expect no match - \x{09f} + \x{09f} No match - + /^\p{Mn}/utf \x{1a1b} 0: \x{1a1b} @@ -2007,7 +2007,7 @@ No match No match \x{2c2} No match - + /^\p{Zs}/utf \ \ 0: @@ -2017,29 +2017,29 @@ No match 0: \x{1680} \x{2000} 0: \x{2000} - \x{2001} + \x{2001} 0: \x{2001} \= Expect no match \x{2028} No match - \x{200d} + \x{200d} No match - + # These are here because Perl has problems with the negative versions of the # properties and has changed how it behaves for caseless matching. - + /\p{^Lu}/i,utf 1234 0: 1 \= Expect no match - ABC + ABC No match /\P{Lu}/i,utf 1234 0: 1 \= Expect no match - ABC + ABC No match /\p{Ll}/i,utf @@ -2048,18 +2048,18 @@ No match Az 0: z \= Expect no match - ABC + ABC No match /\p{Lu}/i,utf A 0: A - a\x{10a0}B + a\x{10a0}B 0: \x{10a0} -\= Expect no match +\= Expect no match a No match - \x{1d00} + \x{1d00} No match /\p{Lu}/i,utf @@ -2068,24 +2068,24 @@ No match aZ 0: Z \= Expect no match - abc + abc No match /[\x{c0}\x{391}]/i,utf \x{c0} 0: \x{c0} - \x{e0} + \x{e0} 0: \x{e0} # The next two are special cases where the lengths of the different cases of # the same character differ. The first went wrong with heap frame storage; the -# second was broken in all cases. +# second was broken in all cases. /^\x{023a}+?(\x{0130}+)/i,utf \x{023a}\x{2c65}\x{0130} 0: \x{23a}\x{2c65}\x{130} 1: \x{130} - + /^\x{023a}+([^X])/i,utf \x{023a}\x{2c65}X 0: \x{23a}\x{2c65} @@ -2116,34 +2116,34 @@ No match /^\x{c0}$/i,utf \x{c0} 0: \x{c0} - \x{e0} + \x{e0} 0: \x{e0} /^\x{e0}$/i,utf \x{c0} 0: \x{c0} - \x{e0} + \x{e0} 0: \x{e0} # The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE # will match it only with UCP support, because without that it has no notion -# of case for anything other than the ASCII letters. +# of case for anything other than the ASCII letters. /((?i)[\x{c0}])/utf \x{c0} 0: \x{c0} 1: \x{c0} - \x{e0} + \x{e0} 0: \x{e0} 1: \x{e0} /(?i:[\x{c0}])/utf \x{c0} 0: \x{c0} - \x{e0} + \x{e0} 0: \x{e0} -# These are PCRE's extra properties to help with Unicodizing \d etc. +# These are PCRE's extra properties to help with Unicodizing \d etc. /^\p{Xan}/utf ABCD @@ -2154,17 +2154,17 @@ No match 0: \x{6ca} \x{a6c} 0: \x{a6c} - \x{10a7} + \x{10a7} 0: \x{10a7} \= Expect no match - _ABC + _ABC No match /^\p{Xan}+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} \= Expect no match - _ABC + _ABC No match /^\p{Xan}+?/utf @@ -2174,15 +2174,15 @@ No match /^\p{Xan}*/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} - + /^\p{Xan}{2,9}/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca} - + /^\p{Xan}{2,9}?/utf \x{6ca}\x{a6c}\x{10a7}_ 0: \x{6ca}\x{a6c} - + /^[\p{Xan}]/utf ABCD1234_ 0: A @@ -2192,26 +2192,26 @@ No match 0: \x{6ca} \x{a6c} 0: \x{a6c} - \x{10a7} + \x{10a7} 0: \x{10a7} \= Expect no match - _ABC + _ABC No match - + /^[\p{Xan}]+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7} \= Expect no match - _ABC + _ABC No match /^>\p{Xsp}/utf >\x{1680}\x{2028}\x{0b} 0: >\x{1680} - >\x{a0} + >\x{a0} 0: >\x{a0} \= Expect no match - \x{0b} + \x{0b} No match /^>\p{Xsp}+/utf @@ -2225,19 +2225,19 @@ No match /^>\p{Xsp}*/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>\p{Xsp}{2,9}/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>\p{Xsp}{2,9}?/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09} - + /^>[\p{Xsp}]/utf >\x{2028}\x{0b} 0: >\x{2028} - + /^>[\p{Xsp}]+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -2245,10 +2245,10 @@ No match /^>\p{Xps}/utf >\x{1680}\x{2028}\x{0b} 0: >\x{1680} - >\x{a0} + >\x{a0} 0: >\x{a0} \= Expect no match - \x{0b} + \x{0b} No match /^>\p{Xps}+/utf @@ -2262,19 +2262,19 @@ No match /^>\p{Xps}*/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>\p{Xps}{2,9}/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>\p{Xps}{2,9}?/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09} - + /^>[\p{Xps}]/utf >\x{2028}\x{0b} 0: >\x{2028} - + /^>[\p{Xps}]+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -2290,10 +2290,10 @@ No match 0: \x{a6c} \x{10a7} 0: \x{10a7} - _ABC + _ABC 0: _ \= Expect no match - [] + [] No match /^\p{Xwd}+/utf @@ -2307,15 +2307,15 @@ No match /^\p{Xwd}*/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - + /^\p{Xwd}{2,9}/utf A_B12\x{6ca}\x{a6c}\x{10a7} 0: A_B12\x{6ca}\x{a6c}\x{10a7} - + /^\p{Xwd}{2,9}?/utf \x{6ca}\x{a6c}\x{10a7}_ 0: \x{6ca}\x{a6c} - + /^[\p{Xwd}]/utf ABCD1234_ 0: A @@ -2325,25 +2325,25 @@ No match 0: \x{6ca} \x{a6c} 0: \x{a6c} - \x{10a7} + \x{10a7} 0: \x{10a7} - _ABC + _ABC 0: _ \= Expect no match - [] + [] No match - + /^[\p{Xwd}]+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_ -# A check not in UTF-8 mode +# A check not in UTF-8 mode /^[\p{Xwd}]+/ ABCD1234_ 0: ABCD1234_ - -# Some negative checks + +# Some negative checks /^[\P{Xwd}]+/utf !.+\x{019}\x{35a}AB @@ -2577,46 +2577,46 @@ No match End ------------------------------------------------------------------ -# Unicode properties for \b abd \B +# Unicode properties for \b abd \B /\b...\B/utf,ucp abc_ 0: abc - \x{37e}abc\x{376} + \x{37e}abc\x{376} 0: abc - \x{37e}\x{376}\x{371}\x{393}\x{394} + \x{37e}\x{376}\x{371}\x{393}\x{394} 0: \x{376}\x{371}\x{393} - !\x{c0}++\x{c1}\x{c2} + !\x{c0}++\x{c1}\x{c2} 0: ++\x{c1} - !\x{c0}+++++ + !\x{c0}+++++ 0: \x{c0}++ -# Without PCRE_UCP, non-ASCII always fail, even if < 256 +# Without PCRE_UCP, non-ASCII always fail, even if < 256 /\b...\B/utf abc_ 0: abc -\= Expect no match - \x{37e}abc\x{376} +\= Expect no match + \x{37e}abc\x{376} No match - \x{37e}\x{376}\x{371}\x{393}\x{394} + \x{37e}\x{376}\x{371}\x{393}\x{394} No match - !\x{c0}++\x{c1}\x{c2} + !\x{c0}++\x{c1}\x{c2} No match - !\x{c0}+++++ + !\x{c0}+++++ No match -# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties +# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties /\b...\B/ucp abc_ 0: abc - !\x{c0}++\x{c1}\x{c2} + !\x{c0}++\x{c1}\x{c2} 0: ++\xc1 - !\x{c0}+++++ + !\x{c0}+++++ 0: \xc0++ -# Some of these are silly, but they check various combinations +# Some of these are silly, but they check various combinations /[[:^alpha:][:^cntrl:]]+/B,utf,ucp ------------------------------------------------------------------ @@ -2627,7 +2627,7 @@ No match ------------------------------------------------------------------ 123 0: 123 - abc + abc 0: abc /[[:^cntrl:][:^alpha:]]+/B,utf,ucp @@ -2639,7 +2639,7 @@ No match ------------------------------------------------------------------ 123 0: 123 - abc + abc 0: abc /[[:alpha:]]+/B,utf,ucp @@ -2661,7 +2661,7 @@ No match ------------------------------------------------------------------ 123 0: 123 - abc + abc 0: abc /[^\d]+/B,utf,ucp @@ -2675,7 +2675,7 @@ No match 0: abc abc\x{123} 0: abc\x{123} - \x{660}abc + \x{660}abc 0: abc /\p{Lu}+9\p{Lu}+B\p{Lu}+b/B @@ -2787,7 +2787,7 @@ No match End ------------------------------------------------------------------ -# These behaved oddly in Perl, so they are kept in this test +# These behaved oddly in Perl, so they are kept in this test /(\x{23a}\x{23a}\x{23a})?\1/i,utf \= Expect no match @@ -2833,12 +2833,12 @@ No match \x{2c65}\x{2c65}\x{23a}\x{23a} 0: \x{2c65}\x{2c65}\x{23a}\x{23a} 1: \x{2c65}\x{2c65} - + /(ⱥⱥ)\1/i,utf - ⱥⱥȺȺ + ⱥⱥȺȺ 0: \x{2c65}\x{2c65}\x{23a}\x{23a} 1: \x{2c65}\x{2c65} - + /(\x{23a}\x{23a}\x{23a})\1Y/i,utf X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y @@ -2849,7 +2849,7 @@ No match 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y 1: \x{2c65}\x{2c65} -# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE +# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE /^[\p{Batak}]/utf \x{1bc0} @@ -2859,7 +2859,7 @@ No match \= Expect no match \x{1bf4} No match - + /^[\p{Brahmi}]/utf \x{11000} 0: \x{11000} @@ -2868,7 +2868,7 @@ No match \= Expect no match \x{1104e} No match - + /^[\p{Mandaic}]/utf \x{840} 0: \x{840} @@ -2877,7 +2877,7 @@ No match \= Expect no match \x{85c} No match - \x{85d} + \x{85d} No match /(\X*)(.)/s,utf @@ -2891,7 +2891,7 @@ No match 0: Ste\x{301}re\x{301}o 1: te\x{301}r 2: \x{301}o - + /^\X/utf ́réo 0: \x{301} @@ -2940,8 +2940,8 @@ Partial match: ab 0: aa aba\=ps 0: aba - -# These Unicode 6.1.0 scripts are not known to Perl. + +# These Unicode 6.1.0 scripts are not known to Perl. /\p{Chakma}\d/utf,ucp \x{11100}\x{1113c} @@ -2964,7 +2964,7 @@ Partial match: A\x{300}\x{301} 0: A\x{301} A\x{301}\=ph Partial match: A\x{301} - + /^\X{2,3}/utf A\=ps Partial match: A @@ -2992,7 +2992,7 @@ Partial match: AA 0: A\x{300}\x{301}A\x{300}\x{301} A\x{300}\x{301}A\x{300}\x{301}\=ph Partial match: A\x{300}\x{301}A\x{300}\x{301} - + /^\X+/utf AA\=ps 0: AA @@ -3165,8 +3165,8 @@ No match \= Expect no match iskt No match - -# This property is a PCRE special + +# This property is a PCRE special /^\p{Xuc}/utf $abc @@ -3178,7 +3178,7 @@ No match \x{1234}abc 0: \x{1234} \= Expect no match - abc + abc No match /^\p{Xuc}+/utf @@ -3262,8 +3262,8 @@ No match No match \x{1234}abc No match - -# Some auto-possessification tests + +# Some auto-possessification tests /\pN+\z/B ------------------------------------------------------------------ @@ -3765,7 +3765,7 @@ No match End ------------------------------------------------------------------ -# End auto-possessification tests +# End auto-possessification tests /\w+/B,utf,ucp,auto_callout ------------------------------------------------------------------ @@ -3912,7 +3912,7 @@ No match Ket End ------------------------------------------------------------------ - + /[R-T]+/Bi,utf,ucp ------------------------------------------------------------------ Bra @@ -3946,7 +3946,7 @@ Subject length lower bound = 1 \x{100}\x{200}\x{300} 0: \x{100}\x{200}\x{300} ^^^^^^^^^^^^^^ - + # Test UTF characters in a substitution /ábc/utf,replace=XሴZ @@ -4101,7 +4101,7 @@ MK: a\x{12345}b\x{09}(d)c 0: \x{de} \x{200} 0: \x{200} -\= Expect no match +\= Expect no match \x{300} No match \x{37e} @@ -4161,11 +4161,11 @@ No match \= Expect no match \x{10000} No match - + # Hex uses pattern length, not zero-terminated. This tests for overrunning # the given length of a pattern. -/'(*UTF)'/hex +/'(*UTF)'/hex /'#('/hex,extended,utf @@ -4236,4 +4236,349 @@ Failed: error 125 at offset 2: lookbehind assertion is not fixed length \=zero_terminate 0: -# End of testinput5 +/^(?1)\p{Nd}{3}(a)/ + a123a + 0: a123a + 1: a + +/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info +Callout 1 x + +# --------------------------------------------------------------------------- + +# A bunch of tests that hit lines of code that others do not (at least when +# these were created). + +/^[^a]{3,}?x/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + bbb +No match + cc +No match + +/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + aaa\x{100} +No match + +/^X\X/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{L&}+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{L}+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{Lu}+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{Arabic}+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\s+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + XX +No match + +/^X\S+?/ucp,no_start_optimize,no_auto_possess + XX + 0: XX +\= Expect no match + X +No match + +/^X\w+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X.+?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\R+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\H+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\V+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\s+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + XX +No match + +/^X\S+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess + XYYYZ + 0: XYYYZ +\= Expect no match + XY +No match + XYY +No match + XYYY +No match + XYYYYZ +No match + +/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + +/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + +/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + +/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + XY\x{2f00}! +No match + +/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + +/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + X\n +No match + X\n! +No match + X\n\n! +No match + +/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XYY\n +No match + +/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + XYY! +No match + +/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + X\x{b5} +No match + X\x{b5}\x{b5}Y +No match + +/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + X$ +No match + X@@Y +No match + +/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess +\= Expect partial match + XYY\r\=ph +Partial match: XYY\x{0d} +\= Expect no match + X +No match + +/^X.+?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + XYY +No match + +/^X\R+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\nX +No match + X\n\rX +No match + X\n\r\nX +No match + X\n\n +No match + X\n\x{0c} +No match + +/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\nX +No match + X\n\rX +No match + X\n\r\nX +No match + X\n\n +No match + X\n\x{0c} +No match + +/^X\H+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\t +No match + XYY +No match + +/^X\h+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\t\t +No match + X\tY +No match + +/^X\V+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + XYY +No match + +/^X\v+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\n\n +No match + X\nY +No match + +/^X\D+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY9 +No match + XYY +No match + +/^X\d+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X99 +No match + X9Y +No match + +/^X\S+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + XYY +No match + +/^X\s+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\n\n +No match + X\nY +No match + +/^X\W+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X.A +No match + X++ +No match + +/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + XY! +No match + +/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + +/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + +/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XYY +No match + +/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X$ +No match + +# --------------------------------------------------------------------------- + +# End of testinput5 -- cgit v1.2.1