diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-04-16 13:03:30 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-04-16 13:03:30 +0000 |
commit | 96771f40a9695dc5fd44e6d4d425b637704a8b2e (patch) | |
tree | db3ad5f1e5dcc0b64fe60e231510d9df34da131b /testdata | |
parent | 5ccdf02b10fccf2c0d241de67b1b58a1f801de1f (diff) | |
download | pcre2-96771f40a9695dc5fd44e6d4d425b637704a8b2e.tar.gz |
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
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput1 | 3 | ||||
-rw-r--r-- | testdata/testinput15 | 3 | ||||
-rw-r--r-- | testdata/testinput2 | 191 | ||||
-rw-r--r-- | testdata/testinput22 | 4 | ||||
-rw-r--r-- | testdata/testinput4 | 13 | ||||
-rw-r--r-- | testdata/testinput5 | 649 | ||||
-rw-r--r-- | testdata/testoutput1 | 5 | ||||
-rw-r--r-- | testdata/testoutput15 | 4 | ||||
-rw-r--r-- | testdata/testoutput2 | 266 | ||||
-rw-r--r-- | testdata/testoutput22-8 | 5 | ||||
-rw-r--r-- | testdata/testoutput4 | 18 | ||||
-rw-r--r-- | testdata/testoutput5 | 743 |
12 files changed, 1506 insertions, 398 deletions
diff --git a/testdata/testinput1 b/testdata/testinput1 index 2a2e855..b449969 100644 --- a/testdata/testinput1 +++ b/testdata/testinput1 @@ -5917,4 +5917,7 @@ ef) x/x,mark /^(?(?!(a)(*ACCEPT))def|abc)/ abc +/^(?1)\d{3}(a)/ + a123a + # End of testinput1 diff --git a/testdata/testinput15 b/testdata/testinput15 index f669e32..cd12ad1 100644 --- a/testdata/testinput15 +++ b/testdata/testinput15 @@ -165,4 +165,7 @@ /(|]+){2,2452}/ (|]+){2,2452} +/(*LIMIT_HEAP=21)\[(a)]{60}/expand + \[a]{60} + # End of testinput15 diff --git a/testdata/testinput2 b/testdata/testinput2 index ec3e30e..57e9521 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -5054,4 +5054,195 @@ a)"xI /(?(VERSION>=999)yes|no)^bc/I +/(*LIMIT_HEAP=0)xxx/I + +/\d{0,3}(*:abc)(?C1)xxx/callout_info + +# ---------------------------------------------------------------------- + +# These are a whole pile of tests that touch lines of code that are not +# used by any other tests (at least when these were created). + +/^a+?x/i,no_start_optimize,no_auto_possess +\= Expect no match + aaa + +/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess +\= Expect no match + bbb + cc + +/^X\S/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\W/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\H/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\h/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\V/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\v/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\h/no_start_optimize,no_auto_possess +\= Expect no match + XY + +/^X\V/no_start_optimize,no_auto_possess +\= Expect no match + X\n + +/^X\v/no_start_optimize,no_auto_possess +\= Expect no match + XX + +/^X.+?/s,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\R+?/no_start_optimize,no_auto_possess +\= Expect no match + XX + +/^X\H+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\h+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\V+?/no_start_optimize,no_auto_possess +\= Expect no match + X + X\n + +/^X\D+?/no_start_optimize,no_auto_possess +\= Expect no match + X + X9 + +/^X\S+?/no_start_optimize,no_auto_possess +\= Expect no match + X + X\n + +/^X\W+?/no_start_optimize,no_auto_possess +\= Expect no match + X + XX + +/^X.+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n + +/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\r\=ps + +/^X\R+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\nX + X\n\r\n + X\n\rY + X\n\nY + X\n\x{0c}Y + +/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\nX + X\n\r\n + X\n\rY + X\n\nY + X\n\x{0c}Y + +/^X\H+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\t + XYY + +/^X\h+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\t\t + X\tY + +/^X\V+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n + XYY + +/^X\v+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\n\n + X\nY + +/^X\D+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY9 + XYY + +/^X\d+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X99 + X9Y + +/^X\S+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n + XYY + +/^X\s+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\n\n + X\nY + +/^X\W+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X.A + X++ + +/^X\w+?Z/no_start_optimize,no_auto_possess +\= Expect no match + Xa. + Xaa + +/^X.{1,3}Z/s,no_start_optimize,no_auto_possess +\= Expect no match + Xa.bd + +/^X\h+Z/no_start_optimize,no_auto_possess +\= Expect no match + X\t\t + X\tY + +/^X\V+Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n + XYY + +/^(X(*THEN)Y|AB){0}(?1)/ + ABX +\= Expect no match + XAB + +/^(?!A(?C1)B)C/ + ABC\=callout_error=1 + +/^(?(?!A(?C1)B)C)/ + ABC\=callout_error=1 + +# ---------------------------------------------------------------------- + # End of testinput2 diff --git a/testdata/testinput22 b/testdata/testinput22 index 7ada9aa..e6d4053 100644 --- a/testdata/testinput22 +++ b/testdata/testinput22 @@ -94,4 +94,8 @@ \= Expect no match in 8-bit mode a\x{100}b +/^ab\C/utf,no_start_optimize +\= Expect no match - tests \C at end of subject + ab + # End of testinput22 diff --git a/testdata/testinput4 b/testdata/testinput4 index 73582b7..798176c 100644 --- a/testdata/testinput4 +++ b/testdata/testinput4 @@ -1627,6 +1627,11 @@ /[z\x{1f88}]+/i,utf \x{1f88}\x{1f80} +# Check a reference with more than one other case + +/^(\x{00b5})\1{2}$/i,utf + \x{00b5}\x{039c}\x{03bc} + # Characters with more than one other case; test in classes /[z\x{00b5}]+/i,utf @@ -2288,4 +2293,12 @@ /(?(?=.*b)(?=.*b)\pL|.*c)/ 11bb +/^\x{123}+?$/utf,no_auto_possess + \x{123}\x{123}\x{123} + +/^\x{123}+?$/i,utf,no_auto_possess + \x{123}\x{122}\x{123} +\= Expect no match + \x{123}\x{124}\x{123} + # End of testinput4 diff --git a/testdata/testinput5 b/testdata/testinput5 index a574872..0e8bf9f 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -15,7 +15,7 @@ /^[\p{Arabic}]/utf \= Expect no match \x{061c} - + /^[[:graph:]]+$/utf,ucp \= Expect no match \x{61c} @@ -39,14 +39,14 @@ /^[[:^print:]]+$/utf,ucp \x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067} \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} /^A\s+Z/utf,ucp A\x{85}\x{180e}\x{2005}Z @@ -54,7 +54,7 @@ /^A[\s]+Z/utf,ucp A\x{2005}Z A\x{85}\x{2005}Z - + /^[[:graph:]]+$/utf,ucp \= Expect no match \x{180e} @@ -106,7 +106,7 @@ /\x{0041}\x{2262}\x{0391}\x{002e}/IB,utf \x{0041}\x{2262}\x{0391}\x{002e} - + /.{3,5}X/IB,utf \x{212ab}\x{212ab}\x{212ab}\x{861}X @@ -118,23 +118,23 @@ \= Expect no match c \x{ff} - \x{100} + \x{100} /^[^ab]/IB,utf c \x{ff} - \x{100} -\= Expect no match + \x{100} +\= Expect no match aaa - + /\x{100}*(\d+|"(?1)")/utf 1234 - "1234" + "1234" \x{100}1234 - "\x{100}1234" - \x{100}\x{100}12ab - \x{100}\x{100}"12" -\= Expect no match + "\x{100}1234" + \x{100}\x{100}12ab + \x{100}\x{100}"12" +\= Expect no match \x{100}\x{100}abcd /\x{100}*/IB,utf @@ -150,7 +150,7 @@ \x{104} \= Expect no match \x{105} - \x{ff} + \x{ff} /[\xFF]/IB >\xff< @@ -160,18 +160,18 @@ /[Ä-Ü]/utf Ö # Matches without Study \x{d6} - + /[Ä-Ü]/utf Ö <-- Same with Study \x{d6} - + /[\x{c4}-\x{dc}]/utf Ö # Matches without Study - \x{d6} + \x{d6} /[\x{c4}-\x{dc}]/utf Ö <-- Same with Study - \x{d6} + \x{d6} /[^\x{100}]abc(xyz(?1))/IB,utf @@ -185,10 +185,10 @@ /\W/utf A.B - A\x{100}B - + A\x{100}B + /\w/utf - \x{100}X + \x{100}X /^\ሴ/IB,utf @@ -197,7 +197,7 @@ ()()()()()()()()()() ()()()()()()()()()() A (x) (?41) B/x,utf - AxxB + AxxB /^[\x{100}\E-\Q\E\x{150}]/B,utf @@ -215,11 +215,11 @@ a\r\nb a\x0bb a\x0cb - a\x{85}b - a\x{2028}b - a\x{2029}b + a\x{85}b + a\x{2028}b + a\x{2029}b \= Expect no match - a\n\rb + a\n\rb /^a\R*b/bsr=unicode,utf ab @@ -228,9 +228,9 @@ a\r\nb a\x0bb a\x0c\x{2028}\x{2029}b - a\x{85}b - a\n\rb - a\n\r\x{85}\x0cb + a\x{85}b + a\n\rb + a\n\r\x{85}\x0cb /^a\R+b/bsr=unicode,utf a\nb @@ -238,20 +238,20 @@ a\r\nb a\x0bb a\x0c\x{2028}\x{2029}b - a\x{85}b - a\n\rb - a\n\r\x{85}\x0cb + a\x{85}b + a\n\rb + a\n\r\x{85}\x0cb \= Expect no match - ab + ab /^a\R{1,3}b/bsr=unicode,utf a\nb a\n\rb a\n\r\x{85}b - a\r\n\r\nb - a\r\n\r\n\r\nb + a\r\n\r\nb + a\r\n\r\n\r\nb a\n\r\n\rb - a\n\n\r\nb + a\n\n\r\nb \= Expect no match a\n\n\n\rb a\r @@ -260,28 +260,28 @@ X X\x0a X\x09X\x0b \= Expect no match - \x{a0} X\x0a - + \x{a0} X\x0a + /\H*\h+\V?\v{3,4}/utf \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c -\= Expect no match +\= Expect no match \x09\x20\x{a0}\x0a\x0b - + /\H\h\V\v/utf \x{3001}\x{3000}\x{2030}\x{2028} X\x{180e}X\x{85} \= Expect no match - \x{2009} X\x0a - + \x{2009} X\x0a + /\H*\h+\V?\v{3,4}/utf \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a \x09\x20\x{202f}\x0a\x0b\x0c -\= Expect no match +\= Expect no match \x09\x{200a}\x{a0}\x{2028}\x0b - + /[\h]/B,utf >\x{1680} @@ -295,57 +295,57 @@ /[\V]/B,utf /.*$/newline=any,utf - \x{1ec5} - + \x{1ec5} + /a\Rb/I,bsr=anycrlf,utf a\rb a\nb a\r\nb \= Expect no match a\x{85}b - a\x0bb + a\x0bb /a\Rb/I,bsr=unicode,utf a\rb a\nb a\r\nb a\x{85}b - a\x0bb - + a\x0bb + /a\R?b/I,bsr=anycrlf,utf a\rb a\nb a\r\nb \= Expect no match a\x{85}b - a\x0bb + a\x0bb /a\R?b/I,bsr=unicode,utf a\rb a\nb a\r\nb a\x{85}b - a\x0bb - + a\x0bb + /.*a.*=.b.*/utf,newline=any QQQ\x{2029}ABCaXYZ=!bPQR \= Expect no match a\x{2029}b - \x61\xe2\x80\xa9\x62 + \x61\xe2\x80\xa9\x62 /[[:a\x{100}b:]]/utf /a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref a\x{1234}b - a\nb + a\nb \= Expect no match - ab - + ab + /a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref aXb - a\nX\nX\x{1234}b + a\nX\nX\x{1234}b \= Expect no match - ab + ab /(\x{de})\1/ \x{de}\x{de} @@ -359,42 +359,42 @@ Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /Xa{2,4}?b/utf X\=ps Xa\=ps Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /Xa{2,4}+b/utf X\=ps Xa\=ps Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /X\x{123}{2,4}b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X\x{123}{2,4}?b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X\x{123}{2,4}+b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X\x{123}{2,4}b/utf \= Expect no match Xx\=ps @@ -402,7 +402,7 @@ X\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}\x{123}x\=ps - + /X\x{123}{2,4}?b/utf \= Expect no match Xx\=ps @@ -410,7 +410,7 @@ X\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}\x{123}x\=ps - + /X\x{123}{2,4}+b/utf \= Expect no match Xx\=ps @@ -418,21 +418,21 @@ X\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}x\=ps X\x{123}\x{123}\x{123}\x{123}x\=ps - + /X\d{2,4}b/utf X\=ps X3\=ps X33\=ps X333\=ps X3333\=ps - + /X\d{2,4}?b/utf X\=ps X3\=ps X33\=ps X333\=ps X3333\=ps - + /X\d{2,4}+b/utf X\=ps X3\=ps @@ -446,14 +446,14 @@ Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /X\D{2,4}?b/utf X\=ps Xa\=ps Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /X\D{2,4}+b/utf X\=ps Xa\=ps @@ -467,14 +467,14 @@ X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X\D{2,4}?b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X\D{2,4}+b/utf X\=ps X\x{123}\=ps @@ -488,14 +488,14 @@ Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /X[abc]{2,4}?b/utf X\=ps Xa\=ps Xaa\=ps Xaaa\=ps Xaaaa\=ps - + /X[abc]{2,4}+b/utf X\=ps Xa\=ps @@ -509,14 +509,14 @@ X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X[abc\x{123}]{2,4}?b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X[abc\x{123}]{2,4}+b/utf X\=ps X\x{123}\=ps @@ -530,14 +530,14 @@ Xzz\=ps Xzzz\=ps Xzzzz\=ps - + /X[^a]{2,4}?b/utf X\=ps Xz\=ps Xzz\=ps Xzzz\=ps Xzzzz\=ps - + /X[^a]{2,4}+b/utf X\=ps Xz\=ps @@ -551,14 +551,14 @@ X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X[^a]{2,4}?b/utf X\=ps X\x{123}\=ps X\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\=ps X\x{123}\x{123}\x{123}\x{123}\=ps - + /X[^a]{2,4}+b/utf X\=ps X\x{123}\=ps @@ -572,14 +572,14 @@ YXYY\=ps YXYYY\=ps YXYYYY\=ps - + /(Y)X\1{2,4}?b/utf YX\=ps YXY\=ps YXYY\=ps YXYYY\=ps YXYYYY\=ps - + /(Y)X\1{2,4}+b/utf YX\=ps YXY\=ps @@ -593,14 +593,14 @@ \x{123}X\x{123}\x{123}\=ps \x{123}X\x{123}\x{123}\x{123}\=ps \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps - + /(\x{123})X\1{2,4}?b/utf \x{123}X\=ps \x{123}X\x{123}\=ps \x{123}X\x{123}\x{123}\=ps \x{123}X\x{123}\x{123}\x{123}\=ps \x{123}X\x{123}\x{123}\x{123}\x{123}\=ps - + /(\x{123})X\1{2,4}+b/utf \x{123}X\=ps \x{123}X\x{123}\=ps @@ -642,13 +642,13 @@ AB\x{a0}xxx\x{85}XYZ /\S \S/utf,tables=2 - \x{a2} \x{84} + \x{a2} \x{84} 'A#хц'Bx,newline=any,utf 'A#хц PQ'Bx,newline=any,utf - + /a+#хaa z#XX?/Bx,newline=any,utf @@ -663,13 +663,13 @@ /(\R*)(.)/s,utf \r\n - \r\r\n\n\r - \r\r\n\n\r\n + \r\r\n\n\r + \r\r\n\n\r\n /(\R)*(.)/s,utf \r\n - \r\r\n\n\r - \r\r\n\n\r\n + \r\r\n\n\r + \r\r\n\n\r\n /[^\x{1234}]+/Ii,utf @@ -690,7 +690,7 @@ /f.*/s,utf for\=ph - + /\x{d7ff}\x{e000}/utf /\x{d800}/utf @@ -779,7 +779,7 @@ /./utf,newline=crlf \r\=ps \r\=ph - + /.{2,3}/utf,newline=crlf \r\=ps \r\=ph @@ -837,9 +837,9 @@ /[\p{Nd}+-]+/IB,utf 1234 12-34 - 12+\x{661}-34 + 12+\x{661}-34 \= Expect no match - abcd + abcd /(?:[\PPa*]*){8,}/ @@ -886,7 +886,7 @@ /\p{Zl}{2,3}+/B,utf \x{2028}\x{2028}\x{2028} - + /\p{Zl}/B,utf /\p{Lu}{3}+/B,utf @@ -906,8 +906,8 @@ /^\p{Cs}/utf \x{dfff}\=no_utf_check \= Expect no match - \x{09f} - + \x{09f} + /^\p{Mn}/utf \x{1a1b} @@ -925,60 +925,60 @@ \= Expect no match X \x{2c2} - + /^\p{Zs}/utf \ \ \x{a0} \x{1680} \x{2000} - \x{2001} + \x{2001} \= Expect no match \x{2028} - \x{200d} - + \x{200d} + # 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 \= Expect no match - ABC + ABC /\P{Lu}/i,utf 1234 \= Expect no match - ABC + ABC /\p{Ll}/i,utf a Az \= Expect no match - ABC + ABC /\p{Lu}/i,utf A - a\x{10a0}B -\= Expect no match + a\x{10a0}B +\= Expect no match a - \x{1d00} + \x{1d00} /\p{Lu}/i,utf A aZ \= Expect no match - abc + abc /[\x{c0}\x{391}]/i,utf \x{c0} - \x{e0} + \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} - + /^\x{023a}+([^X])/i,utf \x{023a}\x{2c65}X @@ -996,71 +996,71 @@ /^\x{c0}$/i,utf \x{c0} - \x{e0} + \x{e0} /^\x{e0}$/i,utf \x{c0} - \x{e0} + \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} - \x{e0} + \x{e0} /(?i:[\x{c0}])/utf \x{c0} - \x{e0} + \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 1234 \x{6ca} \x{a6c} - \x{10a7} + \x{10a7} \= Expect no match - _ABC + _ABC /^\p{Xan}+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ \= Expect no match - _ABC + _ABC /^\p{Xan}+?/utf \x{6ca}\x{a6c}\x{10a7}_ /^\p{Xan}*/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - + /^\p{Xan}{2,9}/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - + /^\p{Xan}{2,9}?/utf \x{6ca}\x{a6c}\x{10a7}_ - + /^[\p{Xan}]/utf ABCD1234_ 1234abcd_ \x{6ca} \x{a6c} - \x{10a7} + \x{10a7} \= Expect no match - _ABC - + _ABC + /^[\p{Xan}]+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ \= Expect no match - _ABC + _ABC /^>\p{Xsp}/utf >\x{1680}\x{2028}\x{0b} - >\x{a0} + >\x{a0} \= Expect no match - \x{0b} + \x{0b} /^>\p{Xsp}+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -1070,24 +1070,24 @@ /^>\p{Xsp}*/utf > \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} - + /^>\p{Xsp}{2,9}?/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>[\p{Xsp}]/utf >\x{2028}\x{0b} - + /^>[\p{Xsp}]+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} /^>\p{Xps}/utf >\x{1680}\x{2028}\x{0b} - >\x{a0} + >\x{a0} \= Expect no match - \x{0b} + \x{0b} /^>\p{Xps}+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -1097,16 +1097,16 @@ /^>\p{Xps}*/utf > \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} - + /^>\p{Xps}{2,9}?/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} - + /^>[\p{Xps}]/utf >\x{2028}\x{0b} - + /^>[\p{Xps}]+/utf > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} @@ -1116,9 +1116,9 @@ \x{6ca} \x{a6c} \x{10a7} - _ABC + _ABC \= Expect no match - [] + [] /^\p{Xwd}+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ @@ -1128,32 +1128,32 @@ /^\p{Xwd}*/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ - + /^\p{Xwd}{2,9}/utf A_B12\x{6ca}\x{a6c}\x{10a7} - + /^\p{Xwd}{2,9}?/utf \x{6ca}\x{a6c}\x{10a7}_ - + /^[\p{Xwd}]/utf ABCD1234_ 1234abcd_ \x{6ca} \x{a6c} - \x{10a7} - _ABC + \x{10a7} + _ABC \= Expect no match - [] - + [] + /^[\p{Xwd}]+/utf ABCD1234\x{6ca}\x{a6c}\x{10a7}_ -# A check not in UTF-8 mode +# A check not in UTF-8 mode /^[\p{Xwd}]+/ ABCD1234_ - -# Some negative checks + +# Some negative checks /^[\P{Xwd}]+/utf !.+\x{019}\x{35a}AB @@ -1223,53 +1223,53 @@ /[[:xdigit:]]/B,ucp -# Unicode properties for \b abd \B +# Unicode properties for \b abd \B /\b...\B/utf,ucp abc_ - \x{37e}abc\x{376} - \x{37e}\x{376}\x{371}\x{393}\x{394} - !\x{c0}++\x{c1}\x{c2} - !\x{c0}+++++ + \x{37e}abc\x{376} + \x{37e}\x{376}\x{371}\x{393}\x{394} + !\x{c0}++\x{c1}\x{c2} + !\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_ -\= Expect no match - \x{37e}abc\x{376} - \x{37e}\x{376}\x{371}\x{393}\x{394} - !\x{c0}++\x{c1}\x{c2} - !\x{c0}+++++ +\= Expect no match + \x{37e}abc\x{376} + \x{37e}\x{376}\x{371}\x{393}\x{394} + !\x{c0}++\x{c1}\x{c2} + !\x{c0}+++++ -# 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_ - !\x{c0}++\x{c1}\x{c2} - !\x{c0}+++++ + !\x{c0}++\x{c1}\x{c2} + !\x{c0}+++++ -# 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 123 - abc + abc /[[:^cntrl:][:^alpha:]]+/B,utf,ucp 123 - abc + abc /[[:alpha:]]+/B,utf,ucp abc /[[:^alpha:]\S]+/B,utf,ucp 123 - abc + abc /[^\d]+/B,utf,ucp abc123 abc\x{123} - \x{660}abc + \x{660}abc /\p{Lu}+9\p{Lu}+B\p{Lu}+b/B @@ -1289,7 +1289,7 @@ /A+\p{N}A+\dB+\p{N}*B+\d*/B,ucp -# 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 @@ -1321,43 +1321,43 @@ /(\x{2c65}\x{2c65})\1/i,utf \x{2c65}\x{2c65}\x{23a}\x{23a} - + /(ⱥⱥ)\1/i,utf - ⱥⱥȺȺ - + ⱥⱥȺȺ + /(\x{23a}\x{23a}\x{23a})\1Y/i,utf X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ /(\x{2c65}\x{2c65})\1Y/i,utf X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ -# 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} \x{1bff} \= Expect no match \x{1bf4} - + /^[\p{Brahmi}]/utf \x{11000} \x{1106f} \= Expect no match \x{1104e} - + /^[\p{Mandaic}]/utf \x{840} \x{85e} \= Expect no match \x{85c} - \x{85d} + \x{85d} /(\X*)(.)/s,utf A\x{300} /^S(\X*)e(\X*)$/utf Stéréo - + /^\X/utf ́réo @@ -1389,8 +1389,8 @@ aa\=ps aa\=ph aba\=ps - -# 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} @@ -1405,7 +1405,7 @@ A\x{300}\x{301}\=ph A\x{301}\=ps A\x{301}\=ph - + /^\X{2,3}/utf A\=ps A\=ph @@ -1421,7 +1421,7 @@ AA\=ph A\x{300}\x{301}A\x{300}\x{301}\=ps A\x{300}\x{301}A\x{300}\x{301}\=ph - + /^\X+/utf AA\=ps AA\=ph @@ -1488,8 +1488,8 @@ /is{2}t/i,utf \= Expect no match iskt - -# This property is a PCRE special + +# This property is a PCRE special /^\p{Xuc}/utf $abc @@ -1497,7 +1497,7 @@ `abc \x{1234}abc \= Expect no match - abc + abc /^\p{Xuc}+/utf $@`\x{a0}\x{1234}\x{e000}** @@ -1554,8 +1554,8 @@ @abc `abc \x{1234}abc - -# Some auto-possessification tests + +# Some auto-possessification tests /\pN+\z/B @@ -1605,7 +1605,7 @@ /\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/Bx,ucp -# End auto-possessification tests +# End auto-possessification tests /\w+/B,utf,ucp,auto_callout abcd @@ -1625,7 +1625,7 @@ /\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B,utf,ucp /[RST]+/Bi,utf,ucp - + /[R-T]+/Bi,utf,ucp /[Q-U]+/Bi,utf,ucp @@ -1638,7 +1638,7 @@ /\x{100}\x{200}\K\x{300}/utf,startchar \x{100}\x{200}\x{300} - + # Test UTF characters in a substitution /ábc/utf,replace=XሴZ @@ -1697,7 +1697,7 @@ /[^[:ascii:]\W]/utf,ucp,bincode \x{de} \x{200} -\= Expect no match +\= Expect no match \x{300} \x{37e} @@ -1725,11 +1725,11 @@ \x{1d7cf} \= Expect no match \x{10000} - + # Hex uses pattern length, not zero-terminated. This tests for overrunning # the given length of a pattern. -/'(*UTF)'/hex +/'(*UTF)'/hex /'#('/hex,extended,utf @@ -1766,4 +1766,255 @@ //g,utf \=zero_terminate -# End of testinput5 +/^(?1)\p{Nd}{3}(a)/ + a123a + +/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info + +# --------------------------------------------------------------------------- + +# 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 + cc + +/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + aaa\x{100} + +/^X\X/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{L&}+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{L}+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{Lu}+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{Arabic}+?/no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\s+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X + XX + +/^X\S+?/ucp,no_start_optimize,no_auto_possess + XX +\= Expect no match + X + +/^X\w+?/ucp,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X.+?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\R+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\H+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\V+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\s+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + XX + +/^X\S+?/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + +/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess + XYYYZ +\= Expect no match + XY + XYY + XYYY + XYYYYZ + +/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + +/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + +/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + +/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + XY\x{2f00}! + +/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + +/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + X\n + X\n! + X\n\n! + +/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XYY\n + +/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + XYY! + +/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess +\= Expect no match + X + X\x{b5} + X\x{b5}\x{b5}Y + +/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X + X$ + X@@Y + +/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess +\= Expect partial match + XYY\r\=ph +\= Expect no match + X + +/^X.+?Z/s,utf,no_start_optimize,no_auto_possess +\= Expect no match + X + XYY + +/^X\R+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\nX + X\n\rX + X\n\r\nX + X\n\n + X\n\x{0c} + +/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\nX + X\n\rX + X\n\r\nX + X\n\n + X\n\x{0c} + +/^X\H+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\t + XYY + +/^X\h+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\t\t + X\tY + +/^X\V+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\n + XYY + +/^X\v+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\n\n + X\nY + +/^X\D+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY9 + XYY + +/^X\d+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X99 + X9Y + +/^X\S+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + XY\n + XYY + +/^X\s+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X\n\n + X\nY + +/^X\W+?Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X.A + X++ + +/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY + XY! + +/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY + +/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XY + +/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess +\= Expect no match + XYY + +/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess +\= Expect no match + X$ + +# --------------------------------------------------------------------------- + +# End of testinput5 diff --git a/testdata/testoutput1 b/testdata/testoutput1 index 95f7f56..43ed7fa 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -9487,4 +9487,9 @@ No match 0: abc 1: a +/^(?1)\d{3}(a)/ + a123a + 0: a123a + 1: a + # End of testinput1 diff --git a/testdata/testoutput15 b/testdata/testoutput15 index 7deb329..f4f68da 100644 --- a/testdata/testoutput15 +++ b/testdata/testoutput15 @@ -400,4 +400,8 @@ No match 0: 1: +/(*LIMIT_HEAP=21)\[(a)]{60}/expand + \[a]{60} +Failed: error -63: heap limit exceeded + # End of testinput15 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index a2975bf..f81d85a 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -15607,6 +15607,272 @@ Capturing subpattern count = 0 Last code unit = 'c' Subject length lower bound = 4 +/(*LIMIT_HEAP=0)xxx/I +Capturing subpattern count = 0 +Heap limit = 0 +First code unit = 'x' +Last code unit = 'x' +Subject length lower bound = 3 + +/\d{0,3}(*:abc)(?C1)xxx/callout_info +Callout 1 x + +# ---------------------------------------------------------------------- + +# These are a whole pile of tests that touch lines of code that are not +# used by any other tests (at least when these were created). + +/^a+?x/i,no_start_optimize,no_auto_possess +\= Expect no match + aaa +No match + +/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess +\= Expect no match + bbb +No match + cc +No match + +/^X\S/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\W/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\H/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\h/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\V/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\v/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\h/no_start_optimize,no_auto_possess +\= Expect no match + XY +No match + +/^X\V/no_start_optimize,no_auto_possess +\= Expect no match + X\n +No match + +/^X\v/no_start_optimize,no_auto_possess +\= Expect no match + XX +No match + +/^X.+?/s,no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\R+?/no_start_optimize,no_auto_possess +\= Expect no match + XX +No match + +/^X\H+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\h+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + +/^X\V+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + X\n +No match + +/^X\D+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + X9 +No match + +/^X\S+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + X\n +No match + +/^X\W+?/no_start_optimize,no_auto_possess +\= Expect no match + X +No match + XX +No match + +/^X.+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + +/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\r\=ps +Partial match: XY\x0d + +/^X\R+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\nX +No match + X\n\r\n +No match + X\n\rY +No match + X\n\nY +No match + X\n\x{0c}Y +No match + +/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\nX +No match + X\n\r\n +No match + X\n\rY +No match + X\n\nY +No match + X\n\x{0c}Y +No match + +/^X\H+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\t +No match + XYY +No match + +/^X\h+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\t\t +No match + X\tY +No match + +/^X\V+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + XYY +No match + +/^X\v+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\n\n +No match + X\nY +No match + +/^X\D+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY9 +No match + XYY +No match + +/^X\d+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X99 +No match + X9Y +No match + +/^X\S+?Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + XYY +No match + +/^X\s+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X\n\n +No match + X\nY +No match + +/^X\W+?Z/no_start_optimize,no_auto_possess +\= Expect no match + X.A +No match + X++ +No match + +/^X\w+?Z/no_start_optimize,no_auto_possess +\= Expect no match + Xa. +No match + Xaa +No match + +/^X.{1,3}Z/s,no_start_optimize,no_auto_possess +\= Expect no match + Xa.bd +No match + +/^X\h+Z/no_start_optimize,no_auto_possess +\= Expect no match + X\t\t +No match + X\tY +No match + +/^X\V+Z/no_start_optimize,no_auto_possess +\= Expect no match + XY\n +No match + XYY +No match + +/^(X(*THEN)Y|AB){0}(?1)/ + ABX + 0: AB +\= Expect no match + XAB +No match + +/^(?!A(?C1)B)C/ + ABC\=callout_error=1 +--->ABC + 1 ^^ B +Failed: error -37: callout error code + +/^(?(?!A(?C1)B)C)/ + ABC\=callout_error=1 +--->ABC + 1 ^^ B +Failed: error -37: callout error code + +# ---------------------------------------------------------------------- + # End of testinput2 Error -64: PCRE2_ERROR_BADDATA (unknown error number) Error -62: bad serialized data diff --git a/testdata/testoutput22-8 b/testdata/testoutput22-8 index 62b0dcc..3d31fbc 100644 --- a/testdata/testoutput22-8 +++ b/testdata/testoutput22-8 @@ -168,4 +168,9 @@ No match a\x{100}b No match +/^ab\C/utf,no_start_optimize +\= Expect no match - tests \C at end of subject + ab +No match + # End of testinput22 diff --git a/testdata/testoutput4 b/testdata/testoutput4 index d2d5e51..bb3f672 100644 --- a/testdata/testoutput4 +++ b/testdata/testoutput4 @@ -2716,6 +2716,13 @@ No match \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} +# Check a reference with more than one other case + +/^(\x{00b5})\1{2}$/i,utf + \x{00b5}\x{039c}\x{03bc} + 0: \x{b5}\x{39c}\x{3bc} + 1: \x{b5} + # Characters with more than one other case; test in classes /[z\x{00b5}]+/i,utf @@ -3711,4 +3718,15 @@ No match 11bb 0: b +/^\x{123}+?$/utf,no_auto_possess + \x{123}\x{123}\x{123} + 0: \x{123}\x{123}\x{123} + +/^\x{123}+?$/i,utf,no_auto_possess + \x{123}\x{122}\x{123} + 0: \x{123}\x{122}\x{123} +\= Expect no match + \x{123}\x{124}\x{123} +No match + # End of testinput4 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: <unset> 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 |