From be7366f6f0849e186fa8186851f09ead0462d81f Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Wed, 16 Sep 2015 16:49:48 +0000 Subject: [PATCH] Tidied up a lot of comments in the test files. --- testdata/testinput1 | 725 ++++++++++++++------------ testdata/testinput10 | 63 ++- testdata/testinput12 | 42 +- testdata/testinput17 | 21 +- testdata/testinput18 | 10 +- testdata/testinput19 | 1 + testdata/testinput2 | 357 +++++++------ testdata/testinput20 | 1 + testdata/testinput3 | 18 +- testdata/testinput4 | 490 +++++++++--------- testdata/testinput5 | 124 +++-- testdata/testinput6 | 591 ++++++++++----------- testdata/testinput7 | 407 +++++++-------- testdata/testinput9 | 2 +- testdata/testoutput1 | 1063 +++++++++++++++----------------------- testdata/testoutput10 | 96 ++-- testdata/testoutput12-16 | 62 +-- testdata/testoutput12-32 | 62 +-- testdata/testoutput17 | 23 +- testdata/testoutput18 | 15 +- testdata/testoutput19 | 1 + testdata/testoutput2 | 535 ++++++++----------- testdata/testoutput20 | 1 + testdata/testoutput3 | 29 +- testdata/testoutput3A | 29 +- testdata/testoutput3B | 29 +- testdata/testoutput4 | 634 +++++++++-------------- testdata/testoutput5 | 178 +++---- testdata/testoutput6 | 918 ++++++++++++-------------------- testdata/testoutput7 | 615 +++++++--------------- testdata/testoutput9 | 3 +- 31 files changed, 3156 insertions(+), 3989 deletions(-) diff --git a/testdata/testinput1 b/testdata/testinput1 index 3a40bab..6d7bc80 100644 --- a/testdata/testinput1 +++ b/testdata/testinput1 @@ -8,8 +8,9 @@ /the quick brown fox/ the quick brown fox - The quick brown FOX What do you know about the quick brown fox? +\= Expect no match + The quick brown FOX What do you know about THE QUICK BROWN FOX? /The quick brown fox/i @@ -52,7 +53,7 @@ >>>aaabxyzpqrrrabbxyyyypqAzz >aaaabxyzpqrrrabbxyyyypqAzz >>>>abcxyzpqrrrabbxyyyypqAzz - *** Failers +\= Expect no match abxyzpqrrabbxyyyypqAzz abxyzpqrrrrabbxyyyypqAzz abxyzpqrrrabxyyyypqAzz @@ -63,7 +64,7 @@ /^(abc){1,2}zz/ abczz abcabczz - *** Failers +\= Expect no match zz abcabcabczz >>abczz @@ -77,7 +78,7 @@ aac abbbbbbbbbbbc bbbbbbbbbbbac - *** Failers +\= Expect no match aaac abbbbbbbbbbbac @@ -90,7 +91,7 @@ aac abbbbbbbbbbbc bbbbbbbbbbbac - *** Failers +\= Expect no match aaac abbbbbbbbbbbac @@ -101,7 +102,7 @@ babc bbabc bababc - *** Failers +\= Expect no match bababbc babababc @@ -109,7 +110,7 @@ babc bbabc bababc - *** Failers +\= Expect no match bababbc babababc @@ -123,7 +124,7 @@ cthing dthing ething - *** Failers +\= Expect no match fthing [thing \\thing @@ -133,7 +134,7 @@ cthing dthing ething - *** Failers +\= Expect no match athing fthing @@ -141,7 +142,7 @@ fthing [thing \\thing - *** Failers +\= Expect no match athing bthing ]thing @@ -152,7 +153,7 @@ /^[^]cde]/ athing fthing - *** Failers +\= Expect no match ]thing cthing dthing @@ -177,7 +178,7 @@ 9 10 100 - *** Failers +\= Expect no match abc /^.*nter/ @@ -188,28 +189,28 @@ /^xxx[0-9]+$/ xxx0 xxx1234 - *** Failers +\= Expect no match xxx /^.+[0-9][0-9][0-9]$/ x123 + x1234 xx123 123456 - *** Failers +\= Expect no match 123 - x1234 /^.+?[0-9][0-9][0-9]$/ x123 + x1234 xx123 123456 - *** Failers +\= Expect no match 123 - x1234 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ abc!pqr=apquxz.ixr.zzz.ac.uk - *** Failers +\= Expect no match !pqr=apquxz.ixr.zzz.ac.uk abc!=apquxz.ixr.zzz.ac.uk abc!pqr=apquxz:ixr.zzz.ac.uk @@ -217,7 +218,8 @@ /:/ Well, we need a colon: somewhere - *** Fail if we don't +\= Expect no match + Fail without a colon /([\da-f:]+)$/i 0abc @@ -228,7 +230,7 @@ 5f03:12C0::932e fed def Any old stuff - *** Failers +\= Expect no match 0zzz gzzz fed\x20 @@ -237,7 +239,7 @@ /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ .1.2.3 A.12.123.0 - *** Failers +\= Expect no match .1.2.3333 1.2.3 1234.2.3 @@ -245,7 +247,7 @@ /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ 1 IN SOA non-sp1 non-sp2( 1 IN SOA non-sp1 non-sp2 ( - *** Failers +\= Expect no match 1IN SOA non-sp1 non-sp2( /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/ @@ -255,7 +257,7 @@ ab-c.pq-r. sxk.zzz.ac.uk. x-.y-. - *** Failers +\= Expect no match -abc.peq. /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/ @@ -263,7 +265,7 @@ *.b0-a *.c3-b.c *.c-a.b-c - *** Failers +\= Expect no match *.0 *.a- *.a-b.c- @@ -287,29 +289,30 @@ \"1234\" \"abcd\" ; \"\" ; rhubarb - *** Failers +\= Expect no match \"1234\" : things /^$/ \ - *** Failers +\= Expect no match + A non-empty line / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x ab c - *** Failers +\= Expect no match abc ab cde /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/ ab c - *** Failers +\= Expect no match abc ab cde /^ a\ b[c ]d $/x a bcd a b d - *** Failers +\= Expect no match abcd ab d @@ -363,7 +366,7 @@ 1234567890 12345678ab 12345678__ - *** Failers +\= Expect no match 1234567 /^[aeiou\d]{4,5}$/ @@ -371,7 +374,7 @@ 1234 12345 aaaaa - *** Failers +\= Expect no match 123456 /^[aeiou\d]{4,5}?/ @@ -384,7 +387,7 @@ /\A(abc|def)=(\1){2,3}\Z/ abc=abcabc def=defdefdef - *** Failers +\= Expect no match abc=defdef /^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/ @@ -403,7 +406,7 @@ /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/ From abcd Mon Sep 01 12:33:02 1997 From abcd Mon Sep 1 12:33:02 1997 - *** Failers +\= Expect no match From abcd Sep 01 12:33:02 1997 /^12.34/s @@ -424,7 +427,7 @@ /^(\D*)(?=\d)(?!123)/ abc456 - *** Failers +\= Expect no match abc123 /^1234(?# test newlines @@ -450,12 +453,12 @@ /(?!^)abc/ the abc - *** Failers +\= Expect no match abc /(?=^)abc/ abc - *** Failers +\= Expect no match the abc /^[ab]{1,3}(ab*|b)/ @@ -671,7 +674,7 @@ A. Other (a comment) \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay A missing angle (a comment) \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay A missing angle .*/)foo" - /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ - "(?>.*/)foo" /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo +\= Expect no match + /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ /(?>(\.\d\d[1-9]?))\d+/ 1.230003938 1.875000282 - *** Failers +\= Expect no match 1.235 /^((?>\w+)|(?>\s+))*$/ now is the time for all good men to come to the aid of the party - *** Failers +\= Expect no match this is not a line with only words and spaces! /(\d+)(\w)/ @@ -1985,7 +1995,7 @@ /((?>\d+))(\w)/ 12345a - *** Failers +\= Expect no match 12345+ /(?>a+)b/ @@ -2009,32 +2019,32 @@ /\(((?>[^()]+)|\([^()]+\))+\)/ (abc) (abc(def)xyz) - *** Failers +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /a(?-i)b/i ab Ab - *** Failers +\= Expect no match aB AB /(a (?x)b c)d e/ a bcd e - *** Failers +\= Expect no match a b cd e abcd e a bcde /(a b(?x)c d (?-x)e f)/ a bcde f - *** Failers +\= Expect no match abcdef /(a(?i)b)c/ abc aBc - *** Failers +\= Expect no match abC aBC Abc @@ -2045,7 +2055,7 @@ /a(?i:b)c/ abc aBc - *** Failers +\= Expect no match ABC abC aBC @@ -2053,14 +2063,14 @@ /a(?i:b)*c/ aBc aBBc - *** Failers +\= Expect no match aBC aBBC /a(?=b(?i)c)\w\wd/ abcd abCd - *** Failers +\= Expect no match aBCd abcD @@ -2068,7 +2078,7 @@ more than million more than MILLION more \n than Million - *** Failers +\= Expect no match MORE THAN MILLION more \n than \n million @@ -2076,7 +2086,7 @@ more than million more than MILLION more \n than Million - *** Failers +\= Expect no match MORE THAN MILLION more \n than \n million @@ -2084,7 +2094,7 @@ abc aBbc aBBc - *** Failers +\= Expect no match Abc abAb abbC @@ -2092,7 +2102,7 @@ /(?=a(?i)b)\w\wc/ abc aBc - *** Failers +\= Expect no match Ab abC aBC @@ -2100,7 +2110,7 @@ /(?<=a(?i)b)(\w\w)c/ abxxc aBxxc - *** Failers +\= Expect no match Abxxc ABxxc abxxC @@ -2108,7 +2118,7 @@ /(?:(a)|b)(?(1)A|B)/ aA bB - *** Failers +\= Expect no match aB bA @@ -2116,7 +2126,7 @@ aa b bb - *** Failers +\= Expect no match ab # Perl gets this next one wrong if the pattern ends with $; in that case it @@ -2126,13 +2136,13 @@ abc: 12 123 - *** Failers +\= Expect no match xyz /^(?(?!abc)\d\d|\w{3}:)$/ abc: 12 - *** Failers +\= Expect no match 123 xyz @@ -2141,7 +2151,7 @@ cat fcat focat - *** Failers +\= Expect no match foocat /(?(?(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/ a @@ -3547,7 +3532,7 @@ the.quick.brown.fox a100.b200.300c 12-ab.1245 - *** Failers +\= Expect no match \ .a -a @@ -3565,38 +3550,40 @@ /(?>.*)(?<=(abcd|wxyz))/ alphabetabcd endingwxyz - *** Failers +\= Expect no match a rather long string that doesn't end with one of them /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/ word cat dog elephant mussel cow horse canary baboon snake shark otherword +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark /word (?>[a-zA-Z0-9]+ ){0,30}otherword/ +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope /(?<=\d{3}(?!999))foo/ 999foo 123999foo - *** Failers +\= Expect no match 123abcfoo /(?<=(?!...999)\d{3})foo/ 999foo 123999foo - *** Failers +\= Expect no match 123abcfoo /(?<=\d{3}(?!999)...)foo/ 123abcfoo 123456foo - *** Failers +\= Expect no match 123999foo /(?<=\d{3}...)(?a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /(?:a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /\Z/g abc\n /^(?s)(?>.*)(?a+|ab)+?c/ +\= Expect no match aabc /(?>a+|ab)+c/ +\= Expect no match aabc /(?:a+|ab)+c/ @@ -4156,9 +4157,11 @@ ab /^(?:a|ab)++c/ +\= Expect no match aaaabc /^(?>a|ab)++c/ +\= Expect no match aaaabc /^(?:a|ab)+c/ @@ -4166,24 +4169,24 @@ /(?=abc){3}abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc)+abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc)++abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc){0}xyz/ xyz /(?=abc){1}xyz/ - ** Failers +\= Expect no match xyz /(?=(a))?./ @@ -4207,7 +4210,7 @@ /^[\g]+/ ggg<<>> - ** Failers +\= Expect no match \\ga /^[\ga]+/ @@ -4224,12 +4227,12 @@ /(?<=a{2})b/i xaabc - ** Failers +\= Expect no match xabc /(?XNNNYZ > X NYQZ - ** Failers +\= Expect no match >XYZ > X NY Z @@ -4328,7 +4331,7 @@ /^abc\K/aftertext abcdef - ** Failers +\= Expect no match defabcxyz /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-2}Z/ @@ -4339,19 +4342,20 @@ bon-bon /(^(a|b\g{-1}))/ +\= Expect no match bacxxx /(?|(abc)|(xyz))\1/ abcabc xyzxyz - ** Failers +\= Expect no match abcxyz xyzabc /(?|(abc)|(xyz))(?1)/ abcabc xyzabc - ** Failers +\= Expect no match xyzxyz /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/ @@ -4366,14 +4370,14 @@ /(?'abc'\w+):\k{2}/ a:aaxyz ab:ababxyz - ** Failers +\= Expect no match a:axyz ab:abxyz /(?'abc'\w+):\g{abc}{2}/ a:aaxyz ab:ababxyz - ** Failers +\= Expect no match a:axyz ab:abxyz @@ -4401,7 +4405,7 @@ 1.2.3.4 131.111.10.206 10.0.0.0 - ** Failers +\= Expect no match 10.6 455.3.4.5 @@ -4409,18 +4413,18 @@ 1.2.3.4 131.111.10.206 10.0.0.0 - ** Failers +\= Expect no match 10.6 455.3.4.5 /^(\w++|\s++)*$/ now is the time for all good men to come to the aid of the party - *** Failers +\= Expect no match this is not a line with only words and spaces! /(\d++)(\w)/ 12345a - *** Failers +\= Expect no match 12345+ /a++b/ @@ -4438,14 +4442,14 @@ /\(([^()]++|\([^()]+\))+\)/ (abc) (abc(def)xyz) - *** Failers +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /^([^()]|\((?1)*\))*$/ abc a(b)c a(b(c))d - *** Failers) +\= Expect no match) a(b(c)d /^>abc>([^()]|\((?1)*\))* hij> def> - *** Failers +\= Expect no match a)(?<=b(?&X))/ @@ -4563,33 +4574,33 @@ /^(?|(abc)|(def))\1/ abcabc defdef - ** Failers +\= Expect no match abcdef defabc /^(?|(abc)|(def))(?1)/ abcabc defabc - ** Failers +\= Expect no match defdef abcdef /(?:a(? (?')|(?")) |b(? (?')|(?")) ) (?('quote')[a-z]+|[0-9]+)/x,dupnames a\"aaaaa b\"aaaaa - ** Failers +\= Expect no match b\"11111 /(?:(?1)|B)(A(*F)|C)/ ABCD CCD - ** Failers +\= Expect no match CAD /^(?:(?1)|B)(A(*F)|C)/ CCD BCD - ** Failers +\= Expect no match ABCD CAD BAD @@ -4600,7 +4611,7 @@ BAD BCD BAX - ** Failers +\= Expect no match ACX ABC @@ -4614,12 +4625,12 @@ (ab(cd)ef) /^(?=a(*SKIP)b|ac)/ - ** Failers +\= Expect no match ac /^(?=a(*PRUNE)b)/ ab - ** Failers +\= Expect no match ac /^(?=a(*ACCEPT)b)/ @@ -4662,27 +4673,31 @@ # I think is a Perl bug. /A(*COMMIT)(B|D)/ +\= Expect no match ACABX # Check the use of names for failure /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/mark - ** Failers +\= Expect no match AC CB /(*MARK:A)(*SKIP:B)(C|X)/mark C +\= Expect no match D /^(A(*THEN:A)B|C(*THEN:B)D)/mark - ** Failers +\= Expect no match CB /^(?:A(*THEN:A)B|C(*THEN:B)D)/mark +\= Expect no match CB /^(?>A(*THEN:A)B|C(*THEN:B)D)/mark +\= Expect no match CB # This should succeed, as the skip causes bump to offset 1 (the mark). Note @@ -4704,6 +4719,7 @@ AAAC /(*:A)A+(*SKIP:A)(B|Z)/mark +\= Expect no match AAAC # This should succeed, as a non-existent skip name disables the skip. @@ -4719,7 +4735,7 @@ /(*COMMIT)(A|P)(B|P)(C|P)/ ABCDEFG - ** Failers +\= Expect no match DEFGABC # COMMIT inside an atomic group can't stop backtracking over the group. @@ -4728,6 +4744,7 @@ abbb /(\w+)b(*COMMIT)\w{2}/ +\= Expect no match abbb # Check opening parens in comment when seeking forward reference. @@ -4738,9 +4755,11 @@ # COMMIT should override THEN. /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/ +\= Expect no match yes /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/ +\= Expect no match yes /b?(*SKIP)c/ @@ -4748,9 +4767,11 @@ abc /(*SKIP)bc/ +\= Expect no match a /(*SKIP)b/ +\= Expect no match a /(?P(?P=abn)xxx|)+/ @@ -4759,7 +4780,7 @@ /(?i:([^b]))(?1)/ aa aA - ** Failers +\= Expect no match ab aB Ba @@ -4767,7 +4788,7 @@ /^(?&t)*+(?(DEFINE)(?a))\w$/ aaaaaaX - ** Failers +\= Expect no match aaaaaa /^(?&t)*(?(DEFINE)(?a))\w$/ @@ -4777,24 +4798,24 @@ /^(a)*+(\w)/ aaaaX YZ - ** Failers +\= Expect no match aaaa /^(?:a)*+(\w)/ aaaaX YZ - ** Failers +\= Expect no match aaaa /^(a)++(\w)/ aaaaX - ** Failers +\= Expect no match aaaa YZ /^(?:a)++(\w)/ aaaaX - ** Failers +\= Expect no match aaaa YZ @@ -4808,13 +4829,13 @@ /^(a){2,}+(\w)/ aaaaX - ** Failers +\= Expect no match aaa YZ /^(?:a){2,}+(\w)/ aaaaX - ** Failers +\= Expect no match aaa YZ @@ -4824,12 +4845,12 @@ aab /(a)++(?1)b/ - ** Failers +\= Expect no match ab aab /(a)*+(?1)b/ - ** Failers +\= Expect no match ab aab @@ -4864,6 +4885,7 @@ aaaab /^(a)(?1)++ab/ +\= Expect no match aaaab /^(?=a(*:M))aZ/mark @@ -4913,6 +4935,7 @@ name)/mark # Capture /^.*? (a(*THEN)b) c/x +\= Expect no match aabc /^.*? (a(*THEN)b|(*F)) c/x @@ -4922,11 +4945,13 @@ name)/mark aabc /^.*? ( (a(*THEN)b) ) c/x +\= Expect no match aabc # Non-capture /^.*? (?:a(*THEN)b) c/x +\= Expect no match aabc /^.*? (?:a(*THEN)b|(*F)) c/x @@ -4936,11 +4961,13 @@ name)/mark aabc /^.*? (?: (?:a(*THEN)b) ) c/x +\= Expect no match aabc # Atomic /^.*? (?>a(*THEN)b) c/x +\= Expect no match aabc /^.*? (?>a(*THEN)b|(*F)) c/x @@ -4950,11 +4977,13 @@ name)/mark aabc /^.*? (?> (?>a(*THEN)b) ) c/x +\= Expect no match aabc # Possessive capture /^.*? (a(*THEN)b)++ c/x +\= Expect no match aabc /^.*? (a(*THEN)b|(*F))++ c/x @@ -4964,11 +4993,13 @@ name)/mark aabc /^.*? ( (a(*THEN)b)++ )++ c/x +\= Expect no match aabc # Possessive non-capture /^.*? (?:a(*THEN)b)++ c/x +\= Expect no match aabc /^.*? (?:a(*THEN)b|(*F))++ c/x @@ -4978,6 +5009,7 @@ name)/mark aabc /^.*? (?: (?:a(*THEN)b)++ )++ c/x +\= Expect no match aabc # Condition assertion @@ -4988,12 +5020,14 @@ name)/mark # Condition /^.*?(?(?=a)a|b(*THEN)c)/ +\= Expect no match ba /^.*?(?:(?(?=a)a|b(*THEN)c)|d)/ ba /^.*?(?(?=a)a(*THEN)b|c)/ +\= Expect no match ac # Assertion @@ -5017,7 +5051,7 @@ name)/mark /(?<=(a(*COMMIT)b))c/ xabcd - ** Failers +\= Expect no match xacd /(?^a)b/s +\= Expect no match aab /(?>.*?)(?<=(abcd)|(wxyz))/ @@ -5214,6 +5259,7 @@ name)/mark endingwxyz "(?>.*)foo" +\= Expect no match abcdfooxyz "(?>.*?)foo" @@ -5226,6 +5272,7 @@ name)/mark ac /(?<=(*SKIP)ac)a/ +\= Expect no match aa /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/x,mark @@ -5299,6 +5346,7 @@ name)/mark # This gives "no match", as expected. /aaaaa(*COMMIT)b|a+c/ +\= Expect no match aaaaaac # ---- Tests using THEN ---- @@ -5357,6 +5405,7 @@ name)/mark /(a(*COMMIT)b)c|abd/ abc +\= Expect no match abd /(?=a(*COMMIT)b)abc|abd/ @@ -5368,14 +5417,16 @@ name)/mark abd /a(?=b(*COMMIT)c)[^d]|abd/ + abc +\= Expect no match abd - abc /a(?=bc).|abd/ abd abc /a(?>b(*COMMIT)c)d|abd/ +\= Expect no match abceabd /a(?>bc)d|abd/ @@ -5385,6 +5436,7 @@ name)/mark abd /(?>a(*COMMIT)c)d|abd/ +\= Expect no match abd /((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/ @@ -5394,7 +5446,7 @@ name)/mark # made them compatible. /^(a)?(?(1)a|b)+$/ - *** Failers +\= Expect no match a /(?=a\Kb)ab/ @@ -5409,58 +5461,73 @@ name)/mark /^abc(?foo)|(?bar))\k/dupnames @@ -5558,7 +5631,7 @@ name)/mark /(?A)(?:(?foo)|(?bar))\k/dupnames AfooA AbarA - ** Failers +\= Expect no match Afoofoo Abarbar @@ -5609,6 +5682,7 @@ name)/mark ababc /(?:x|(?:(xx|yy)+|x|x|x|x|x)|a|a|a)bc/ +\= Expect no match acb '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++' @@ -5639,6 +5713,7 @@ name)/mark bbbaaabaabb /(?:(?P=same)?(?:(?P=same)(?Pa)(?P=same)|(?P=same)?(?Pb)(?P=same)){2}(?P=same)(?Pc)(?P=same)){2}(?Pz)?/g,dupnames +\= Expect no match bbbaaaccccaaabbbcc /(?Pa)?(?Pb)?(?()c|d)*l/ @@ -5702,7 +5777,7 @@ name)/mark /(?|(aaa)|(b))(?1)/ aaaaaa baaa - ** Failers +\= Expect no match bb /(?|(aaa)|(b))/ diff --git a/testdata/testinput10 b/testdata/testinput10 index dc43629..1af551a 100644 --- a/testdata/testinput10 +++ b/testdata/testinput10 @@ -38,16 +38,21 @@ /a\C\Cb/utf a\x{100}b - ** Failers +\= Expect no match a\x{12257}b +# The next 3 patterns have UTF-8 errors + /[Ã]/utf /Ã/utf /ÃÃÃxxx/utf +# Now test subjects + /badutf/utf +\= Expect UTF-8 errors X\xdf XX\xef XXX\xef\x80 @@ -89,11 +94,13 @@ \xff /badutf/utf +\= Expect UTF-8 errors XX\xfb\x80\x80\x80\x80 XX\xfd\x80\x80\x80\x80\x80 XX\xf7\xbf\xbf\xbf /shortutf/utf +\= Expect UTF-8 errors XX\xdf\=ph XX\xef\=ph XX\xef\x80\=ph @@ -111,6 +118,7 @@ \xfd\x80\x80\x80\x80\=ph /anything/utf +\= Expect UTF-8 errors X\xc0\x80 XX\xc1\x8f XXX\xe0\x9f\x80 @@ -119,15 +127,16 @@ \xfc\x83\x80\x80\x80\x80 \xfe\x80\x80\x80\x80\x80 \xff\x80\x80\x80\x80\x80 + \xf8\x88\x80\x80\x80 + \xf9\x87\x80\x80\x80 + \xfc\x84\x80\x80\x80\x80 + \xfd\x83\x80\x80\x80\x80 +\= Expect no match \xc3\x8f \xe0\xaf\x80 \xe1\x80\x80 \xf0\x9f\x80\x80 \xf1\x8f\x80\x80 - \xf8\x88\x80\x80\x80 - \xf9\x87\x80\x80\x80 - \xfc\x84\x80\x80\x80\x80 - \xfd\x83\x80\x80\x80\x80 \xf8\x88\x80\x80\x80\=no_utf_check \xf9\x87\x80\x80\x80\=no_utf_check \xfc\x84\x80\x80\x80\x80\=no_utf_check @@ -136,31 +145,38 @@ # Similar tests with offsets /badutf/utf +\= Expect UTF-8 errors X\xdfabcd X\xdfabcd\=offset=1 +\= Expect no match X\xdfabcd\=offset=2 /(?<=x)badutf/utf +\= Expect UTF-8 errors X\xdfabcd X\xdfabcd\=offset=1 X\xdfabcd\=offset=2 - X\xdfabcd\=offset=3 X\xdfabcd\xdf\=offset=3 +\= Expect no match + X\xdfabcd\=offset=3 /(?<=xx)badutf/utf +\= Expect UTF-8 errors X\xdfabcd X\xdfabcd\=offset=1 X\xdfabcd\=offset=2 X\xdfabcd\=offset=3 /(?<=xxxx)badutf/utf +\= Expect UTF-8 errors X\xdfabcd X\xdfabcd\=offset=1 X\xdfabcd\=offset=2 X\xdfabcd\=offset=3 - X\xdfabcd\=offset=6 X\xdfabc\xdf\=offset=6 X\xdfabc\xdf\=offset=7 +\= Expect no match + X\xdfabcd\=offset=6 /\x{100}/IB,utf @@ -208,7 +224,7 @@ # correctly, but that messes up comparisons). /a\Cb/utf - *** Failers +\= Expect no match a\x{100}b /[^ab\xC0-\xF0]/IB,utf @@ -216,7 +232,7 @@ \x{bf} \x{100} \x{1000} - *** Failers +\= Expect no match \x{c0} \x{f0} @@ -243,7 +259,6 @@ \x{100} Z\x{100} \x{100}Z - *** Failers /[\xff]/IB,utf >\x{ff}< @@ -265,21 +280,23 @@ # This tests the stricter UTF-8 check according to RFC 3629. /X/utf +\= Expect UTF-8 errors \x{d800} - \x{d800}\=no_utf_check \x{da00} - \x{da00}\=no_utf_check \x{dfff} - \x{dfff}\=no_utf_check \x{110000} - \x{110000}\=no_utf_check \x{2000000} - \x{2000000}\=no_utf_check \x{7fffffff} +\= Expect no match + \x{d800}\=no_utf_check + \x{da00}\=no_utf_check + \x{dfff}\=no_utf_check + \x{110000}\=no_utf_check + \x{2000000}\=no_utf_check \x{7fffffff}\=no_utf_check /(*UTF8)\x{1234}/ - abcd\x{1234}pqr + abcd\x{1234}pqr /(*CRLF)(*UTF)(*BSR_UNICODE)a\Rb/I @@ -319,11 +336,14 @@ /a+/utf a\x{123}aa\=offset=1 - a\x{123}aa\=offset=2 a\x{123}aa\=offset=3 a\x{123}aa\=offset=4 - a\x{123}aa\=offset=5 +\= Expect bad offset value a\x{123}aa\=offset=6 +\= Expect bad UTF-8 offset + a\x{123}aa\=offset=2 +\= Expect no match + a\x{123}aa\=offset=5 /\x{1234}+/Ii,utf @@ -424,7 +444,6 @@ Z\x{100} \x{100} \x{100}Z - *** Failers /[z-\x{100}]/IB,utf @@ -450,7 +469,7 @@ \x{104} \x{105} \x{109} - ** Failers +\= Expect no match \x{100} \x{10a} @@ -464,7 +483,7 @@ \x{ff} \x{100} \x{101} - ** Failers +\= Expect no match \x{102} Y y @@ -474,6 +493,6 @@ /\x{3a3}B/IBi,utf /abc/utf,replace=à - abc + abc # End of testinput10 diff --git a/testdata/testinput12 b/testdata/testinput12 index 8223908..c021e11 100644 --- a/testdata/testinput12 +++ b/testdata/testinput12 @@ -34,7 +34,7 @@ X\x{11234}Y X\x{11234}YZ X\x{11234}\x{512}YZ - *** Failers +\= Expect no match X\x{11234} /a\Cb/utf @@ -43,8 +43,8 @@ /a\C\Cb/utf a\x{12257}b +\= Expect no match a\x{12257}\x{11234}b - ** Failers a\x{100}b /ab\Cde/utf @@ -90,19 +90,14 @@ /\x{212ab}/IB,utf -# This one is here not because it's different to Perl, but because the way -# the captured single-byte is displayed. (In Perl it becomes a character, and you -# can't tell the difference.) +# These two \C tests, copied from the UTF-8 input file, do not have any +# problems in 16 or 32 bits. /X(\C)(.*)/utf X\x{1234} X\nabc -# This one is here because Perl gives out a grumbly error message (quite -# correctly, but that messes up comparisons). - /a\Cb/utf - *** Failers a\x{100}b /[^ab\xC0-\xF0]/IB,utf @@ -110,7 +105,7 @@ \x{bf} \x{100} \x{1000} - *** Failers +\= Expect no match \x{c0} \x{f0} @@ -137,7 +132,6 @@ \x{100} Z\x{100} \x{100}Z - *** Failers /[\xff]/IB,utf >\x{ff}< @@ -157,19 +151,21 @@ /^[\QÄ€\E-\QÅ\E/B,utf /X/utf - XX\x{d800} - XX\x{d800}\=offset=3 XX\x{d800}\=no_utf_check - XX\x{da00} XX\x{da00}\=no_utf_check - XX\x{dc00} XX\x{dc00}\=no_utf_check - XX\x{de00} XX\x{de00}\=no_utf_check - XX\x{dfff} XX\x{dfff}\=no_utf_check +\= Expect UTF error + XX\x{d800} + XX\x{da00} + XX\x{dc00} + XX\x{de00} + XX\x{dfff} XX\x{110000} XX\x{d800}\x{1234} +\= Expect no match + XX\x{d800}\=offset=3 /(?<=.)X/utf XX\x{d800}\=offset=3 @@ -233,7 +229,9 @@ a\x{123}aa\=offset=1 a\x{123}aa\=offset=2 a\x{123}aa\=offset=3 +\= Expect no match a\x{123}aa\=offset=4 +\= Expect bad offset error a\x{123}aa\=offset=5 a\x{123}aa\=offset=6 @@ -254,11 +252,16 @@ # Check bad offset /a/utf +\= Expect bad UTF-16 offset, or no match in 32-bit \x{10000}\=offset=1 \x{10000}ab\=offset=1 +\= Expect 16-bit match, 32-bit no match \x{10000}ab\=offset=2 +\= Expect no match \x{10000}ab\=offset=3 +\= Expect no match in 16-bit, bad offset in 32-bit \x{10000}ab\=offset=4 +\= Expect bad offset \x{10000}ab\=offset=5 /í¼€/utf @@ -345,7 +348,6 @@ Z\x{100} \x{100} \x{100}Z - *** Failers /[z-\x{100}]/IB,utf @@ -371,7 +373,7 @@ \x{104} \x{105} \x{109} - ** Failers +\= Expect no match \x{100} \x{10a} @@ -385,7 +387,7 @@ \x{ff} \x{100} \x{101} - ** Failers +\= Expect no match \x{102} Y y diff --git a/testdata/testinput17 b/testdata/testinput17 index e808ccd..1474eb9 100644 --- a/testdata/testinput17 +++ b/testdata/testinput17 @@ -18,28 +18,33 @@ /abcd/I abcd +\= Expect no match xyz /(*NO_JIT)abcd/I abcd +\= Expect no match xyz /abcd/ abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jitfast abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=1 abcd ab\=ps ab\=ph +\= Expect no match xyz xyz\=ps @@ -47,13 +52,15 @@ abcd ab\=ps ab\=ph - xyz xyz\=ps +\= Expect no match + xyz /abcd/jit=2 abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=2,jitfast @@ -66,35 +73,41 @@ abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=4 abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=5 abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=6 abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/jit=7 abcd ab\=ps ab\=ph +\= Expect no match xyz /abcd/I,jit=2 /(*NO_START_OPT)a(*:m)b/mark +\= Expect no match a /^12345678abcd/m @@ -104,6 +117,7 @@ /(a+)*zz/I aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits +\= Expect no match aaaaaaaaaaaaaz\=find_limits !((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I @@ -140,7 +154,9 @@ aabbccddee\=jitstack=1 /(a+)*zz/ +\= Expect no match aaaaaaaaaaaaaz +\= Expect limit exceeded aaaaaaaaaaaaaz\=match_limit=3000 /(*LIMIT_MATCH=3000)(a+)*zz/I @@ -151,7 +167,9 @@ aaaaaaaaaaaaaz /(*LIMIT_MATCH=60000)(a+)*zz/I +\= Expect no match aaaaaaaaaaaaaz +\= Expect limit exceeded aaaaaaaaaaaaaz\=match_limit=3000 # These three have infinitely nested recursions. @@ -171,6 +189,7 @@ /abcd/ abcd\=anchored +\= Expect no match fail abcd\=anchored /abcd/jitfast diff --git a/testdata/testinput18 b/testdata/testinput18 index fcf9e21..4c8324e 100644 --- a/testdata/testinput18 +++ b/testdata/testinput18 @@ -19,7 +19,6 @@ /abc/ abc - *** Failers /^abc|def/ abcdef @@ -31,7 +30,7 @@ /the quick brown fox/ the quick brown fox - *** Failers +\= Expect no match The Quick Brown Fox /the quick brown fox/i @@ -39,7 +38,7 @@ The Quick Brown Fox /(*LF)abc.def/ - *** Failers +\= Expect no match abc\ndef /(*LF)abc$/ @@ -49,6 +48,7 @@ /(abc)\2/ /(abc\1)/ +\= Expect no match abc /a*(b+)(z)(z)/ @@ -60,7 +60,7 @@ /(*ANY)ab.cd/ ab-cd ab=cd - ** Failers +\= Expect no match ab\ncd /ab.cd/s @@ -76,7 +76,7 @@ /a?|b?/ abc - ** Failers +\= Expect no match ddd\=notempty /\w+A/ diff --git a/testdata/testinput19 b/testdata/testinput19 index eebce2c..7a90f1a 100644 --- a/testdata/testinput19 +++ b/testdata/testinput19 @@ -9,6 +9,7 @@ a\x{1234}b /\w/ +\= Expect no match +++\x{c2} /\w/ucp diff --git a/testdata/testinput2 b/testdata/testinput2 index 719f3e4..08da226 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -31,14 +31,14 @@ abc defabc abc\=anchored - *** Failers +\= Expect no match defabc\=anchored ABC /^abc/I abc abc\=anchored - *** Failers +\= Expect no match defabc defabc\=anchored @@ -52,7 +52,7 @@ /^abc$/I abc - *** Failers +\= Expect no match def\nabc /ab\idef/ @@ -129,7 +129,7 @@ /abc$/I,dollar_endonly abc - *** Failers +\= Expect no match abc\n abc\ndef @@ -141,7 +141,7 @@ /the quick brown fox/I,anchored the quick brown fox - *** Failers +\= Expect no match this is a line with the quick brown fox /ab(?z)cd/ @@ -185,7 +185,7 @@ /(?^abc)/Im abc def\nabc - *** Failers +\= Expect no match defabc /(?<=ab(c+)d)ef/ @@ -295,7 +295,7 @@ /(?<=bullock|donkey)-cart/I the bullock-cart a donkey-cart race - *** Failers +\= Expect no match cart horse-and-cart @@ -312,7 +312,7 @@ zZZ bZZ BZZ - *** Failers +\= Expect no match ZZ abXYZZ zzz @@ -321,30 +321,31 @@ /(?[^()]+) | (?R) )? \) /Ix @@ -721,7 +722,7 @@ /((?-i)[[:lower:]])[[:lower:]]/Ii ab aB - *** Failers +\= Expect no match Ab AB @@ -797,13 +798,13 @@ /a(?i)b/IB ab aB - *** Failers +\= Expect no match AB /(a(?i)b)/IB ab aB - *** Failers +\= Expect no match AB / (?i)abc/IBx @@ -833,7 +834,7 @@ /\Q\Eabc/IB /x*+\w/IB - *** Failers +\= Expect no match xxxxx /x?+/IB @@ -852,12 +853,12 @@ /^(\w++|\s++)*$/I now is the time for all good men to come to the aid of the party - *** Failers +\= Expect no match this is not a line with only words and spaces! /(\d++)(\w)/I 12345a - *** Failers +\= Expect no match 12345+ /a++b/I @@ -875,7 +876,7 @@ /\(([^()]++|\([^()]+\))+\)/I (abc) (abc(def)xyz) - *** Failers +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /(abc){1,3}+/IB @@ -938,7 +939,7 @@ hij> def> - *** Failers +\= Expect no match iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b/IB @@ -1009,7 +1010,7 @@ /^a/Im abcde xy\nabc - *** Failers +\= Expect no match xyabc /c|abc/I @@ -1021,7 +1022,7 @@ /abc(?C)def/I abcdef 1234abcdef - *** Failers +\= Expect no match abcxyz abcxyzf @@ -1030,12 +1031,12 @@ /(?C1)\dabc(?C2)def/I 1234abcdef - *** Failers +\= Expect no match abcdef /(?C1)\dabc(?C2)def/I 1234abcdef - *** Failers +\= Expect no match abcdef /(?C255)ab/I @@ -1047,20 +1048,18 @@ /(?C12vr)x/I /abc(?C)def/I - *** Failers \x83\x0\x61bcdef /(abc)(?C)de(?C1)f/I 123abcdef 123abcdef\=callout_capture 123abcdefC-\=callout_none - *** Failers +\= Expect no match 123abcdef\=callout_fail=1 /(?C0)(abc(?C1))*/I abcabcabc abcabc\=callout_fail=1:3 - *** Failers abcabcabc\=callout_fail=1:3 /(\d{3}(?C))*/I @@ -1084,9 +1083,11 @@ abcxyz\=callout_capture /a(b+)(c*)(?C1)/I +\= Expect no match abbbbbccc\=callout_data=1 /a(b+?)(c*?)(?C1)/I +\= Expect no match abbbbbccc\=callout_data=1 /(?C)abc/I @@ -1101,14 +1102,14 @@ xde xxab xxxab - *** Failers +\= Expect no match xyab /^([^()]|\((?1)*\))*$/I abc a(b)c a(b(c))d - *** Failers) +\= Expect no match) a(b(c)d /^>abc>([^()]|\((?1)*\))* hij> def> - *** Failers +\= Expect no match cd)ef(?Pgh)/I @@ -1237,7 +1239,7 @@ "\[((?P\d+)(,(?P>elem))*)\]"I [10,20,30,5,5,4,4,2,43,23,4234] - *** Failers +\= Expect no match [] "\[((?P\d+)(,(?P>elem))*)?\]"I @@ -1270,6 +1272,7 @@ /abcde/IB,auto_callout abcde +\= Expect no match abcdfe /a*b/IB,auto_callout @@ -1285,18 +1288,19 @@ /a+b/IB,auto_callout ab aaaab +\= Expect no match aaaacb /(abc|def)x/IB,auto_callout abcx defx - ** Failers +\= Expect no match abcdefzx /(abc|def)x/IB,auto_callout abcx defx - ** Failers +\= Expect no match abcdefzx /(ab|cd){3,4}/I,auto_callout @@ -1305,9 +1309,11 @@ abcdcdcdcdcd /([ab]{,4}c|xy)/IB,auto_callout +\= Expect no match Note: that { does NOT introduce a quantifier /([ab]{,4}c|xy)/IB,auto_callout +\= Expect no match Note: that { does NOT introduce a quantifier /([ab]{1,4}c|xy){4,5}?123/IB,auto_callout @@ -1328,7 +1334,7 @@ abcd\=ps abcde\=ps the quick brown abc\=ps - ** Failers\=ps +\= Expect no match\=ps the quick brown abxyz fox\=ps "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I @@ -1343,7 +1349,7 @@ 02/\=ps 02/0\=ps 02/1\=ps - ** Failers\=ps +\= Expect no match\=ps \=ps 123\=ps 33/4/04\=ps @@ -1377,7 +1383,7 @@ 1234X 12345\=ps 12345X - *** Failers +\= Expect no match 1X 123456\=ps @@ -1390,17 +1396,17 @@ /line\nbreak/I,firstline this is a line\nbreak - ** Failers +\= Expect no match line one\nthis is a line\nbreak in the second line /line\nbreak/Im,firstline this is a line\nbreak - ** Failers +\= Expect no match line one\nthis is a line\nbreak in the second line /(?i)(?-i)AbCd/I AbCd - ** Failers +\= Expect no match abcd /a{11111111111111111111}/I @@ -1455,7 +1461,6 @@ /^((?Pa1)|(?Pa2)b)/I,dupnames a1b\=copy=A a2b\=copy=A - ** Failers a1b\=copy=Z,copy=A /(?|(?)(?)(?)|(?)(?)(?))/I,dupnames @@ -1473,7 +1478,6 @@ /^((?Pa1)|(?Pa2)b)/I,dupnames a1b\=get=A a2b\=get=A - ** Failers a1b\=get=Z,get=A /^(?Pa)(?Pb)/I,dupnames @@ -1492,9 +1496,9 @@ /^(?Pa) (?J:(?Pb)(?Pc)) (?Pd)/I -/ In this next test, J is not set at the outer level; consequently it isn't -set in the pattern's options; consequently pcre_get_named_substring() produces -a random value. /Ix +# In this next test, J is not set at the outer level; consequently it isn't set +# in the pattern's options; consequently pcre2_substring_get_byname() produces +# a random value. /^(?Pa) (?J:(?Pb)(?Pc)) (?Pd)/I a bc d\=copy=A,copy=B,copy=C @@ -1502,7 +1506,7 @@ a random value. /Ix /^(?Pa)?(?(A)a|b)/I aabc bc - ** Failers +\= Expect no match abc /(?:(?(ZZ)a|b)(?PX))+/I @@ -1534,7 +1538,7 @@ a random value. /Ix /^abc/Im,newline=lf xyz\nabc xyz\r\nabc - ** Failers +\= Expect no match xyz\rabc xyzabc\r xyzabc\rpqr @@ -1543,13 +1547,13 @@ a random value. /Ix /^abc/Im,newline=crlf xyz\r\nabclf> - ** Failers +\= Expect no match xyz\nabclf xyz\rabclf /^abc/Im,newline=cr xyz\rabc - ** Failers +\= Expect no match xyz\nabc xyz\r\nabc @@ -1607,7 +1611,7 @@ a random value. /Ix /^a+A\d/IB aaaA5 - ** Failers +\= Expect no match aaaa5 /^a*A\d/IBi @@ -1779,7 +1783,7 @@ a random value. /Ix /^(?:(?(ZZ)a|b)(?X))+/ bXaX bXbX - ** Failers +\= Expect no match aXaX aXbX @@ -1800,14 +1804,14 @@ a random value. /Ix /^((?(abc)a|b)(?x|y))+/ bxay bxby - ** Failers +\= Expect no match axby /^(((?P=abc)|X)(?x|y))+/ XxXxxx XxXyyx XxXyxx - ** Failers +\= Expect no match x /^(?1)(abc)/ @@ -1840,7 +1844,7 @@ a random value. /Ix Satan, oscillate my metallic sonatas! A man, a plan, a canal: Panama! Able was I ere I saw Elba. - *** Failers +\= Expect no match The quick brown fox /(?=(\w+))\1:/I @@ -1851,14 +1855,14 @@ a random value. /Ix /(?'abc'a|b)(?d|e)\k{2}/dupnames adaa - ** Failers +\= Expect no match addd adbb /(?'abc'a|b)(?d|e)(?&abc){2}/dupnames bdaa bdab - ** Failers +\= Expect no match bddd /(?(tom|bon)-\k{A}/ tom-tom bon-bon - ** Failers +\= Expect no match tom-bon /\g{A/ @@ -2101,7 +2108,7 @@ a random value. /Ix xxyzx /\H++X/B - ** Failers +\= Expect no match XXXX /\H+\hY/B @@ -2157,21 +2164,27 @@ a random value. /Ix /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/B /^a+(*FAIL)/auto_callout +\= Expect no match aaaaaa /a+b?c+(*FAIL)/auto_callout +\= Expect no match aaabccc /a+b?(*PRUNE)c+(*FAIL)/auto_callout +\= Expect no match aaabccc /a+b?(*COMMIT)c+(*FAIL)/auto_callout +\= Expect no match aaabccc /a+b?(*SKIP)c+(*FAIL)/auto_callout +\= Expect no match aaabcccaaabccc /a+b?(*THEN)c+(*FAIL)/auto_callout +\= Expect no match aaabccc /a(*MARK)b/ @@ -2185,6 +2198,7 @@ a random value. /Ix /(?1)\c[/ /.+A/newline=crlf +\= Expect no match \r\nA /\nA/newline=crlf @@ -2200,33 +2214,33 @@ a random value. /Ix /(*CR)a.b/ a\nb - ** Failers +\= Expect no match a\rb /(*CR)a.b/newline=lf a\nb - ** Failers +\= Expect no match a\rb /(*LF)a.b/newline=CRLF a\rb - ** Failers +\= Expect no match a\nb /(*CRLF)a.b/ a\rb a\nb - ** Failers +\= Expect no match a\r\nb /(*ANYCRLF)a.b/newline=CR - ** Failers +\= Expect no match a\rb a\nb a\r\nb /(*ANY)a.b/newline=cr - ** Failers +\= Expect no match a\rb a\nb a\r\nb @@ -2245,7 +2259,7 @@ a random value. /Ix a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x85b a\x0bb @@ -2260,7 +2274,7 @@ a random value. /Ix a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x85b a\x0bb @@ -2275,7 +2289,7 @@ a random value. /Ix a\r\n\nb a\n\r\rb a\r\n\r\n\r\n\r\nb - ** Failers +\= Expect no match a\x85\x85b a\x0b\x0bb @@ -2285,7 +2299,7 @@ a random value. /Ix a\r\n\n\r\rb a\x85\x85b a\x0b\x0bb - ** Failers +\= Expect no match a\r\r\r\r\rb /(*BSR_ANYCRLF)a\Rb/I @@ -2361,10 +2375,11 @@ a random value. /Ix /^(?+1)(?x|y){0}z/ xzxx yzyy - ** Failers +\= Expect no match xxz /(\3)(\1)(a)/ +\= Expect no match cat /(\3)(\1)(a)/alt_bsux,allow_empty_class,match_unset_backref,dupnames @@ -2384,12 +2399,12 @@ a random value. /Ix /(?1)[]a()b](abc)/ abcbabc - ** Failers +\= Expect no match abcXabc /(?1)[^]a()b](abc)/ abcXabc - ** Failers +\= Expect no match abcbabc /(?2)[]a()b](abc)(xyz)/ @@ -2406,27 +2421,27 @@ a random value. /Ix /a[^]b/ /a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[^]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames aXb a\nb - ** Failers +\= Expect no match ab /a[^]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames aXb a\nX\nXb - ** Failers +\= Expect no match ab /a(?!)b/B @@ -2449,13 +2464,13 @@ a random value. /Ix /xyz/auto_callout xyz abcxyz - ** Failers +\= Expect no match abc abcxypqr /xyz/auto_callout,no_start_optimize abcxyz - ** Failers +\= Expect no match abc abcxypqr @@ -2611,10 +2626,12 @@ a random value. /Ix ++++Z1234\=ps /Z(*F)/ +\= Expect no match Z\=ps ZA\=ps /Z(?!)/ +\= Expect no match Z\=ps ZA\=ps @@ -2667,14 +2684,14 @@ a random value. /Ix abcdef abcdef\=notempty_atstart xyzabcdef\=notempty_atstart - ** Failers +\= Expect no match abcdef\=notempty xyzabcdef\=notempty /^(?:(?=abc)|abc\K)/aftertext,startchar abcdef abcdef\=notempty_atstart - ** Failers +\= Expect no match abcdef\=notempty /a?b?/aftertext @@ -2683,13 +2700,13 @@ a random value. /Ix xyzabc\=notempty xyzabc\=notempty_atstart xyz\=notempty_atstart - ** Failers +\= Expect no match xyz\=notempty /^a?b?/aftertext xyz xyzabc - ** Failers +\= Expect no match xyzabc\=notempty xyzabc\=notempty_atstart xyz\=notempty_atstart @@ -2737,7 +2754,7 @@ a random value. /Ix /(?i:\g)(?-i:(?a))/ XaaX - ** Failers +\= Expect no match XAAX /(?-i:\g<+1>)(?i:(a))/ @@ -2822,20 +2839,20 @@ a random value. /Ix (?('quote')[a-z]+|[0-9]+)/Ix,dupnames a"aaaaa b"aaaaa - ** Failers +\= Expect no match b"11111 a"11111 /^(?|(a)(b)(c)(?d)|(?e)) (?('D')X|Y)/IBx,dupnames abcdX eX - ** Failers +\= Expect no match abcdY ey /(?a) (b)(c) (?d (?(R&A)$ | (?4)) )/IBx,dupnames abcdd - ** Failers +\= Expect no match abcdde /abcd*/ @@ -2869,7 +2886,7 @@ a random value. /Ix XABD BAD ABXABD - ** Failers +\= Expect no match ABX BAXBAD @@ -2880,6 +2897,7 @@ a random value. /Ix cat /(\3)(\1)(a)/I +\= Expect no match cat /i(?(DEFINE)(?a))/I @@ -2892,7 +2910,7 @@ a random value. /Ix XabX XAbX CcC - ** Failers +\= Expect no match XABX /(?i)a(?s)b|c/B @@ -2906,8 +2924,8 @@ a random value. /Ix /^(?&t)*(?(DEFINE)(?.))$/B -/ -- This one is here because Perl gives the match as "b" rather than "ab". I - believe this to be a Perl bug. --/ +# This one is here because Perl gives the match as "b" rather than "ab". I +# believe this to be a Perl bug. /(?>a\Kb)z|(ab)/ ab\=startchar @@ -2926,6 +2944,7 @@ a random value. /Ix # bug because replacing the B in the pattern by (B|D) does make it fail. /A(*COMMIT)B/aftertext,mark +\= Expect no match ACABX # These should be different, but in Perl they are not, which I think @@ -2935,13 +2954,14 @@ a random value. /Ix AC /A(*PRUNE)B|A(*PRUNE)C/mark +\= Expect no match AC # Mark names can be duplicated. Perl doesn't give a mark for this one, # though PCRE2 does. /^A(*:A)B|^X(*:A)Y/mark - ** Failers +\= Expect no match XAQQ # COMMIT at the start of a pattern should be the same as an anchor. Perl @@ -2952,16 +2972,19 @@ a random value. /Ix ABCDEFG /(*COMMIT)ABC/no_start_optimize - ** Failers +\= Expect no match DEFGABC /^(ab (c+(*THEN)cd) | xyz)/x +\= Expect no match abcccd /^(ab (c+(*PRUNE)cd) | xyz)/x +\= Expect no match abcccd /^(ab (c+(*FAIL)cd) | xyz)/x +\= Expect no match abcccd # Perl gets some of these wrong @@ -2980,20 +3003,20 @@ a random value. /Ix /A\NB./B ACBD - *** Failers +\= Expect no match A\nB ACB\n /A\NB./Bs ACBD ACB\n - *** Failers +\= Expect no match A\nB /A\NB/newline=crlf A\nB A\rB - ** Failers +\= Expect no match A\r\nB /\R+b/B @@ -3022,6 +3045,7 @@ a random value. /Ix X\x0d\x0a /X\H++\R/B +\= Expect no match X\x0d\x0a /(?<=abc)def/ @@ -3056,17 +3080,21 @@ a random value. /Ix abc\=ph /abc\B/ - abc abc\=ps abc\=ph +\= Expect no match + abc /.+/ +\= Bad offsets + abc\=offset=4 + abc\=offset=-4 +\= Valid data abc\=offset=0 abc\=offset=1 abc\=offset=2 +\= Expect no match abc\=offset=3 - abc\=offset=4 - abc\=offset=-4 /^\cÄ£/ @@ -3105,12 +3133,12 @@ a random value. /Ix /^(a)*+(\w)/ aaaaX - ** Failers +\= Expect no match aaaa /^(?:a)*+(\w)/ aaaaX - ** Failers +\= Expect no match aaaa /(a)++1234/IB @@ -3176,7 +3204,7 @@ a random value. /Ix /(?1)(?:(b(*ACCEPT))){0}c/ bc - ** Failers +\= Expect no match b /(?1)(?:((*ACCEPT))){0}c/ @@ -3184,18 +3212,22 @@ a random value. /Ix c\=notempty /^.*?(?(?=a)a|b(*THEN)c)/ +\= Expect no match ba /^.*?(?(?=a)a|bc)/ ba /^.*?(?(?=a)a(*THEN)b|c)/ +\= Expect no match ac /^.*?(?(?=a)a(*THEN)b)c/ +\= Expect no match ac /^.*?(a(*THEN)b)c/ +\= Expect no match aabc /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x @@ -3212,9 +3244,11 @@ a random value. /Ix /(*MARK:A)(*SKIP:B)(C|X)/mark C +\= Expect no match D /(*:A)A+(*SKIP:A)(B|Z)/mark +\= Expect no match AAAC # ---------------------------- @@ -3229,6 +3263,7 @@ a random value. /Ix /(?>(*ACCEPT)b)c/ c +\= Expect no match c\=notempty /(?:(?>(a)))+a%/allaftertext @@ -3297,6 +3332,7 @@ a random value. /Ix aeqwerty /.(*F)/ +\= Expect no match abc\=ph /\btype\b\W*?\btext\b\W*?\bjavascript\b/I @@ -3310,9 +3346,10 @@ a random value. /Ix ax 'a*(*ACCEPT)b'aftertext - \=notempty_atstart abc\=notempty_atstart bbb\=notempty_atstart +\= Expect no match + \=notempty_atstart /(*ACCEPT)a/I,aftertext bax @@ -3322,7 +3359,7 @@ a random value. /Ix /^(?>a+)(?>(z+))\w/B aaaazzzzb - ** Failers +\= Expect no match aazz /(.)(\1|a(?2))/ @@ -3332,6 +3369,7 @@ a random value. /Ix cbbbc /(.)((?(1)c|a)|a(?2))/ +\= Expect no match baa /(?P(?P=abn)xxx)/B @@ -3340,7 +3378,7 @@ a random value. /Ix /^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aAz - *** Failers +\= Expect no match ax41z /^a[m\x41]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames @@ -3351,7 +3389,7 @@ a random value. /Ix /^a\u0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aAz - *** Failers +\= Expect no match au0041z /^a[m\u0041]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames @@ -3359,12 +3397,12 @@ a random value. /Ix /^a\u041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames au041z - *** Failers +\= Expect no match aAz /^a\U0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aU0041z - *** Failers +\= Expect no match aAz /(?(?=c)c|d)++Y/B @@ -3389,7 +3427,7 @@ a random value. /Ix /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/x,mark AABC XXYZ - ** Failers +\= Expect no match XAQQ XAQQXZZ AXQQQ @@ -3400,12 +3438,12 @@ a random value. /Ix /(b|q)(*:m)f|a(*:n)w/mark aw - ** Failers +\= Expect no match abc /(q|b)(*:m)f|a(*:n)w/mark aw - ** Failers +\= Expect no match abc # After a partial match, the behaviour is as for a failure. @@ -3653,8 +3691,9 @@ a random value. /Ix ad /^(?!a(*THEN)b|ac)../ - ac ad +\= Expect no match + ac /^(?=a(*THEN)b|ac)/ ac @@ -3681,6 +3720,7 @@ a random value. /Ix bnn /(?(?=b(*SKIP)a)bn|bnn)/ +\= Expect no match bnn /(?=b(*THEN)a|)bn|bnn/ @@ -3876,7 +3916,7 @@ a random value. /Ix a /red/ thing red is a colour put it all on red - ** Failers +\= Expect no match no reduction Alfred Winifred @@ -3886,6 +3926,7 @@ a random value. /Ix abcd\=startchar /abcd/newline=lf,firstline +\= Expect no match xx\nxabcd # Test stack guard external calls. @@ -3924,7 +3965,7 @@ a random value. /Ix /^(?(?=abc)\w{3}:|\d\d)$/ abc: 12 - *** Failers +\= Expect no match 123 xyz @@ -3962,13 +4003,13 @@ a random value. /Ix /(?(VERSION=8)yes|no){3}/I yesnononoyes - ** Failers +\= Expect no match yesno /(?:(?abc)|xyz)(?(VERSION)yes|no)/I abcyes xyzno - ** Failers +\= Expect no match abcno xyzyes @@ -4112,6 +4153,7 @@ a random value. /Ix a "(?(?=)==)(((((((((?=)))))))))" +\= Expect no match a /(a)(b)|(c)/ @@ -4135,9 +4177,11 @@ a random value. /Ix /^abc/info,no_dotstar_anchor /.*\d/info,auto_callout +\= Expect no match aaa /.*\d/info,no_dotstar_anchor,auto_callout +\= Expect no match aaa /.*\d/dotall,info @@ -4179,7 +4223,7 @@ a random value. /Ix /(?(?=0)(?=00)?00765|(?!3).56)/ 00765 456 - ** Failers +\= Expect no match 356 '^(a)*+(\w)' @@ -4251,7 +4295,7 @@ a random value. /Ix /(?(?!)a|b)/ bbb - ** Failers +\= Expect no match aaa # JIT gives a different error message for the infinite recursion @@ -4286,6 +4330,7 @@ a random value. /Ix /ab\Cde/never_backslash_c /abc/ +\= Expect no match \[9x!xxx(]{9999} /(abc)*/ @@ -4417,6 +4462,7 @@ a random value. /Ix aab /^a(*PRUNE)b/s +\= Expect no match aab /.*?a(*SKIP)b/ @@ -4427,6 +4473,7 @@ a random value. /Ix /((?(R8000000000)))/ /0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/ +\= Expect no match 01 /(?(1)()\983040\2)/ @@ -4438,9 +4485,11 @@ a random value. /Ix /(?:ab)?(?:ab)(?:ab)/ abab ababab +\= Expect no match aba /((*MARK:A))++a(*SKIP:B)b/ +\= Expect no match aacb /(*MARK:a\zb)z/alt_verbnames diff --git a/testdata/testinput20 b/testdata/testinput20 index 3a8f06e..9ec3174 100644 --- a/testdata/testinput20 +++ b/testdata/testinput20 @@ -36,6 +36,7 @@ #pop mark C +\= Expect no match D #pop diff --git a/testdata/testinput3 b/testdata/testinput3 index 2e1fbf5..f8d7016 100644 --- a/testdata/testinput3 +++ b/testdata/testinput3 @@ -8,35 +8,35 @@ #forbid_utf /^[\w]+/ - *** Failers +\= Expect no match École /^[\w]+/locale=fr_FR École /^[\w]+/ - *** Failers +\= Expect no match École /^[\W]+/ École /^[\W]+/locale=fr_FR - *** Failers +\= Expect no match École /[\b]/ \b - *** Failers +\= Expect no match a /[\b]/locale=fr_FR \b - *** Failers +\= Expect no match a /^\w+/ - *** Failers +\= Expect no match École /^\w+/locale=fr_FR @@ -46,12 +46,12 @@ École /(.+)\b(.+)/locale=fr_FR - *** Failers +\= Expect no match École /École/i École - *** Failers +\= Expect no match école /École/i,locale=fr_FR @@ -72,7 +72,7 @@ /^[\xc8-\xc9]/ École - *** Failers +\= Expect no match école /\W+/ diff --git a/testdata/testinput4 b/testdata/testinput4 index 90c4c25..22aead5 100644 --- a/testdata/testinput4 +++ b/testdata/testinput4 @@ -10,14 +10,14 @@ acb a\x7fb a\x{100}b - *** Failers +\= Expect no match a\nb /a(.{3})b/utf a\x{4000}xyb a\x{4000}\x7fyb a\x{4000}\x{100}yb - *** Failers +\= Expect no match a\x{4000}b ac\ncb @@ -55,7 +55,7 @@ a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b - *** Failers +\= Expect no match a\x{1234}b ac\ncb @@ -65,7 +65,7 @@ a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers +\= Expect no match a\x{1234}b /a(.{3,}?)b/utf @@ -74,7 +74,7 @@ a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers +\= Expect no match a\x{1234}b /a(.{3,5})b/utf @@ -85,7 +85,7 @@ a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb - *** Failers +\= Expect no match a\x{1234}b axxxxxxbcdefghijb @@ -97,12 +97,12 @@ a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb - *** Failers +\= Expect no match a\x{1234}b axxxxxxbcdefghijb /^[a\x{c0}]/utf - *** Failers +\= Expect no match \x{100} /(?<=aXb)cd/utf @@ -116,19 +116,19 @@ /(?:\x{100}){3}b/utf \x{100}\x{100}\x{100}b - *** Failers +\= Expect no match \x{100}\x{100}b /\x{ab}/utf \x{ab} \xc2\xab - *** Failers +\= Expect no match \x00{ab} /(?<=(.))X/utf WXYZ \x{256}XYZ - *** Failers +\= Expect no match XYZ /[^a]+/g,utf @@ -215,199 +215,185 @@ /\D+/utf 12abcd34 - *** Failers +\= Expect no match 1234 /\D{2,3}/utf 12abcd34 12ab34 - *** Failers +\= Expect no match 1234 12a34 /\D{2,3}?/utf 12abcd34 12ab34 - *** Failers +\= Expect no match 1234 12a34 /\d+/utf 12abcd34 - *** Failers /\d{2,3}/utf 12abcd34 1234abcd - *** Failers +\= Expect no match 1.4 /\d{2,3}?/utf 12abcd34 1234abcd - *** Failers +\= Expect no match 1.4 /\S+/utf 12abcd34 - *** Failers +\= Expect no match \ \ /\S{2,3}/utf 12abcd34 1234abcd - *** Failers +\= Expect no match \ \ /\S{2,3}?/utf 12abcd34 1234abcd - *** Failers +\= Expect no match \ \ />\s+ <34 - *** Failers />\s{2,3} \s{2,3}? ^`|~ !\"#%&'()*,-./:;?@[\\]_{} \x{a1}\x{a7} @@ -2214,6 +2221,7 @@ \x{23a}\x{23a}\x{2c65}\x{23a} /^(\x{23a})\1*(....)/i,utf +\= Expect no match \x{23a}\x{2c65}\x{2c65}\x{2c65} \x{23a}\x{23a}\x{2c65}\x{23a} diff --git a/testdata/testinput5 b/testdata/testinput5 index bc76526..cb33f57 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -11,11 +11,11 @@ # test 4. /^[\p{Arabic}]/utf - ** Failers +\= Expect no match \x{061c} /^[[:graph:]]+$/utf,ucp - ** Failers +\= Expect no match \x{61c} \x{2066} \x{2067} @@ -23,7 +23,7 @@ \x{2069} /^[[:print:]]+$/utf,ucp - ** Failers +\= Expect no match \x{61c} \x{2066} \x{2067} @@ -54,6 +54,7 @@ A\x{85}\x{2005}Z /^[[:graph:]]+$/utf,ucp +\= Expect no match \x{180e} /^[[:print:]]+$/utf,ucp @@ -63,6 +64,7 @@ \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{61c}\x{1680}\x{180e} /^[[:^print:]]+$/utf,ucp +\= Expect no match \x{180e} # End of U+180E tests. @@ -114,7 +116,7 @@ /^[ab]/IB,utf bar - *** Failers +\= Expect no match c \x{ff} \x{100} @@ -123,7 +125,7 @@ c \x{ff} \x{100} - *** Failers +\= Expect no match aaa /\x{100}*(\d+|"(?1)")/utf @@ -133,7 +135,7 @@ "\x{100}1234" \x{100}\x{100}12ab \x{100}\x{100}"12" - *** Failers +\= Expect no match \x{100}\x{100}abcd /\x{100}*/IB,utf @@ -147,7 +149,7 @@ /[Ä€-Ä„]/utf \x{100} \x{104} - *** Failers +\= Expect no match \x{105} \x{ff} @@ -217,7 +219,7 @@ a\x{85}b a\x{2028}b a\x{2029}b - ** Failers +\= Expect no match a\n\rb /^a\R*b/bsr=unicode,utf @@ -240,7 +242,7 @@ a\x{85}b a\n\rb a\n\r\x{85}\x0cb - ** Failers +\= Expect no match ab /^a\R{1,3}b/bsr=unicode,utf @@ -251,34 +253,34 @@ a\r\n\r\n\r\nb a\n\r\n\rb a\n\n\r\nb - ** Failers +\= Expect no match a\n\n\n\rb a\r /\H\h\V\v/utf X X\x0a X\x09X\x0b - ** Failers +\= Expect no match \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 - ** Failers +\= 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} - ** Failers +\= Expect no match \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 - ** Failers +\= Expect no match \x09\x{200a}\x{a0}\x{2028}\x0b /[\h]/B,utf @@ -300,7 +302,7 @@ a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x{85}b a\x0bb @@ -315,7 +317,7 @@ a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x{85}b a\x0bb @@ -325,11 +327,10 @@ a\r\nb a\x{85}b a\x0bb - ** Failers /.*a.*=.b.*/utf,newline=any QQQ\x{2029}ABCaXYZ=!bPQR - ** Failers +\= Expect no match a\x{2029}b \x61\xe2\x80\xa9\x62 @@ -338,13 +339,13 @@ /a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref a\x{1234}b a\nb - ** Failers +\= Expect no match ab /a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref aXb a\nX\nX\x{1234}b - ** Failers +\= Expect no match ab /(\x{de})\1/ @@ -396,6 +397,7 @@ X\x{123}\x{123}\x{123}\x{123}\=ps /X\x{123}{2,4}b/utf +\= Expect no match Xx\=ps X\x{123}x\=ps X\x{123}\x{123}x\=ps @@ -403,6 +405,7 @@ X\x{123}\x{123}\x{123}\x{123}x\=ps /X\x{123}{2,4}?b/utf +\= Expect no match Xx\=ps X\x{123}x\=ps X\x{123}\x{123}x\=ps @@ -410,6 +413,7 @@ X\x{123}\x{123}\x{123}\x{123}x\=ps /X\x{123}{2,4}+b/utf +\= Expect no match Xx\=ps X\x{123}x\=ps X\x{123}\x{123}x\=ps @@ -804,6 +808,7 @@ /(?<=\x{1234}\x{1234})\bxy/I,utf /(?\p{Xsp}/utf >\x{1680}\x{2028}\x{0b} >\x{a0} - ** Failers +\= Expect no match \x{0b} /^>\p{Xsp}+/utf @@ -1082,7 +1087,7 @@ /^>\p{Xps}/utf >\x{1680}\x{2028}\x{0b} >\x{a0} - ** Failers +\= Expect no match \x{0b} /^>\p{Xps}+/utf @@ -1113,7 +1118,7 @@ \x{a6c} \x{10a7} _ABC - ** Failers +\= Expect no match [] /^\p{Xwd}+/utf @@ -1138,7 +1143,7 @@ \x{a6c} \x{10a7} _ABC - ** Failers +\= Expect no match [] /^[\p{Xwd}]+/utf @@ -1232,7 +1237,7 @@ /\b...\B/utf abc_ - ** Failers +\= Expect no match \x{37e}abc\x{376} \x{37e}\x{376}\x{371}\x{393}\x{394} !\x{c0}++\x{c1}\x{c2} @@ -1288,9 +1293,11 @@ # These behaved oddly in Perl, so they are kept in this test /(\x{23a}\x{23a}\x{23a})?\1/i,utf +\= Expect no match \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65} /(ȺȺȺ)?\1/i,utf +\= Expect no match ȺȺȺⱥⱥ /(\x{23a}\x{23a}\x{23a})?\1/i,utf @@ -1300,9 +1307,11 @@ ȺȺȺⱥⱥⱥ /(\x{23a}\x{23a}\x{23a})\1/i,utf +\= Expect no match \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65} /(ȺȺȺ)\1/i,utf +\= Expect no match ȺȺȺⱥⱥ /(\x{23a}\x{23a}\x{23a})\1/i,utf @@ -1328,19 +1337,19 @@ /^[\p{Batak}]/utf \x{1bc0} \x{1bff} - ** Failers +\= Expect no match \x{1bf4} /^[\p{Brahmi}]/utf \x{11000} \x{1106f} - ** Failers +\= Expect no match \x{1104e} /^[\p{Mandaic}]/utf \x{840} \x{85e} - ** Failers +\= Expect no match \x{85c} \x{85d} @@ -1355,7 +1364,7 @@ /^a\X41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aX41z - *** Failers +\= Expect no match aAz /(?<=ab\Cde)X/utf @@ -1453,7 +1462,7 @@ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2} /\x{3a3}++./i,utf,aftertext - ** Failers +\= Expect no match \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2} /\x{3a3}*\x{3c2}/Bi,utf @@ -1463,19 +1472,24 @@ /[^a]*\x{3c2}/Bi,utf /ist/Bi,utf +\= Expect no match ikt /is+t/i,utf iSs\x{17f}t +\= Expect no match ikt /is+?t/i,utf +\= Expect no match ikt /is?t/i,utf +\= Expect no match ikt /is{2}t/i,utf +\= Expect no match iskt # This property is a PCRE special @@ -1485,52 +1499,52 @@ @abc `abc \x{1234}abc - ** Failers +\= Expect no match abc /^\p{Xuc}+/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}+?/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}+?\*/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}++/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}{3,5}/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}{3,5}?/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^[\p{Xuc}]/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^[\p{Xuc}]+/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\P{Xuc}/utf abc - ** Failers +\= Expect no match $abc @abc `abc @@ -1538,7 +1552,7 @@ /^[\P{Xuc}]/utf abc - ** Failers +\= Expect no match $abc @abc `abc @@ -1654,9 +1668,11 @@ /\C\X*TÓ…; {0,6}\v+ F /utf +\= Expect no match Ó…\x0a /\C(\W?Å¿)'?{{/utf +\= Expect no match \\C(\\W?Å¿)'?{{ /[\pS#moq]/ diff --git a/testdata/testinput6 b/testdata/testinput6 index 636447a..9297b63 100644 --- a/testdata/testinput6 +++ b/testdata/testinput6 @@ -17,7 +17,7 @@ /ab+c/ abc abbbbbbc - *** Failers +\= Expect no match ac ab @@ -34,59 +34,59 @@ /^abc/ abcdef - *** Failers +\= Expect no match xyzabc xyz\nabc /^abc/m abcdef xyz\nabc - *** Failers +\= Expect no match xyzabc /\Aabc/ abcdef - *** Failers +\= Expect no match xyzabc xyz\nabc /\Aabc/m abcdef - *** Failers +\= Expect no match xyzabc xyz\nabc /\Gabc/ abcdef xyzabc\=offset=3 - *** Failers +\= Expect no match xyzabc xyzabc\=offset=2 /x\dy\Dz/ x9yzz x0y+z - *** Failers +\= Expect no match xyz xxy0z /x\sy\Sz/ x yzz x y+z - *** Failers +\= Expect no match xyz xxyyz /x\wy\Wz/ xxy+z - *** Failers +\= Expect no match xxy0z x+y+z /x.y/ x+y x-y - *** Failers +\= Expect no match x\ny /x.y/s @@ -98,46 +98,45 @@ a+bc+dp+q a+bc\ndp+q x\nyp+q - *** Failers +\= Expect no match a\nbc\ndp+q a+bc\ndp\nq x\nyp\nq /a\d\z/ ba0 - *** Failers +\= Expect no match ba0\n ba0\ncd /a\d\z/m ba0 - *** Failers +\= Expect no match ba0\n ba0\ncd /a\d\Z/ ba0 ba0\n - *** Failers +\= Expect no match ba0\ncd /a\d\Z/m ba0 ba0\n - *** Failers +\= Expect no match ba0\ncd /a\d$/ ba0 ba0\n - *** Failers +\= Expect no match ba0\ncd /a\d$/m ba0 ba0\n ba0\ncd - *** Failers /abc/i abc @@ -158,14 +157,14 @@ axxyz axxxyzq axxxxyzq - *** Failers +\= Expect no match ax axx /x{3}yz/ axxxyzq axxxxyzq - *** Failers +\= Expect no match ax axx ayzq @@ -176,7 +175,7 @@ axxyz axxxyzq axxxxyzq - *** Failers +\= Expect no match ax axx ayzq @@ -185,13 +184,12 @@ /[^a]+/no_auto_possess bac bcdefax - *** Failers +\= Expect no match aaaaa /[^a]*/no_auto_possess bac bcdefax - *** Failers aaaaa /[^a]{3,5}/no_auto_possess @@ -199,7 +197,7 @@ awxyza abcdefa abcdefghijk - *** Failers +\= Expect no match axya axa aaaaa @@ -214,25 +212,24 @@ /\d+/ ab1234c56 - *** Failers +\= Expect no match xyz /\D+/ ab123c56 - *** Failers +\= Expect no match 789 /\d?A/ 045ABC ABC - *** Failers +\= Expect no match XYZ /\D?A/ ABC BAC 9ABC - *** Failers /a+/ aaaa @@ -244,7 +241,7 @@ /^.+xyz/ abcdxyz axyz - *** Failers +\= Expect no match xyz /^.?xyz/ @@ -254,7 +251,7 @@ /^\d{2,3}X/ 12X 123X - *** Failers +\= Expect no match X 1X 1234X @@ -264,7 +261,7 @@ b93 c99z d04 - *** Failers +\= Expect no match e45 abcd abcd1234 @@ -277,7 +274,7 @@ d04 abcd1234 1234 - *** Failers +\= Expect no match e45 abcd @@ -287,7 +284,7 @@ c99z d04 abcd1234 - *** Failers +\= Expect no match 1234 e45 abcd @@ -302,14 +299,14 @@ c99z d04 1234 - *** Failers +\= Expect no match abcd1234 e45 /^[abcd]{2,3}\d/ ab45 bcd93 - *** Failers +\= Expect no match 1234 a36 abcd1234 @@ -319,24 +316,23 @@ abc45 abcabcabc45 42xyz - *** Failers /^(abc)+\d/ abc45 abcabcabc45 - *** Failers +\= Expect no match 42xyz /^(abc)?\d/ abc45 42xyz - *** Failers +\= Expect no match abcabcabc45 /^(abc){2,3}\d/ abcabc45 abcabcabc45 - *** Failers +\= Expect no match abcabcabcabc45 abc45 42xyz @@ -355,7 +351,7 @@ abc a(b)c a(b(c))d - *** Failers) +\= Expect no match) a(b(c)d /^>abc>([^()]|\((?1)*\))*a*)\d/ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876 - *** Failers +\= Expect no match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x @@ -375,33 +371,33 @@ hij> def> - *** Failers +\= Expect no match >>aaabxyzpqrrrabbxyyyypqAzz >aaaabxyzpqrrrabbxyyyypqAzz >>>>abcxyzpqrrrabbxyyyypqAzz - *** Failers +\= Expect no match abxyzpqrrabbxyyyypqAzz abxyzpqrrrrabbxyyyypqAzz abxyzpqrrrabxyyyypqAzz @@ -563,7 +559,7 @@ /^(abc){1,2}zz/ abczz abcabczz - *** Failers +\= Expect no match zz abcabcabczz >>abczz @@ -577,7 +573,7 @@ aac abbbbbbbbbbbc bbbbbbbbbbbac - *** Failers +\= Expect no match aaac abbbbbbbbbbbac @@ -590,7 +586,7 @@ aac abbbbbbbbbbbc bbbbbbbbbbbac - *** Failers +\= Expect no match aaac abbbbbbbbbbbac @@ -601,7 +597,7 @@ babc bbabc bababc - *** Failers +\= Expect no match bababbc babababc @@ -609,7 +605,7 @@ babc bbabc bababc - *** Failers +\= Expect no match bababbc babababc @@ -623,7 +619,7 @@ cthing dthing ething - *** Failers +\= Expect no match fthing [thing \\thing @@ -633,7 +629,7 @@ cthing dthing ething - *** Failers +\= Expect no match athing fthing @@ -641,7 +637,7 @@ fthing [thing \\thing - *** Failers +\= Expect no match athing bthing ]thing @@ -652,7 +648,7 @@ /^[^]cde]/ athing fthing - *** Failers +\= Expect no match ]thing cthing dthing @@ -677,7 +673,7 @@ 9 10 100 - *** Failers +\= Expect no match abc /^.*nter/ @@ -688,28 +684,28 @@ /^xxx[0-9]+$/ xxx0 xxx1234 - *** Failers +\= Expect no match xxx /^.+[0-9][0-9][0-9]$/ x123 xx123 123456 - *** Failers - 123 x1234 +\= Expect no match + 123 /^.+?[0-9][0-9][0-9]$/ x123 xx123 123456 - *** Failers - 123 x1234 +\= Expect no match + 123 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ abc!pqr=apquxz.ixr.zzz.ac.uk - *** Failers +\= Expect no match !pqr=apquxz.ixr.zzz.ac.uk abc!=apquxz.ixr.zzz.ac.uk abc!pqr=apquxz:ixr.zzz.ac.uk @@ -717,7 +713,8 @@ /:/ Well, we need a colon: somewhere - *** Fail if we don't +\= Expect no match + No match without a colon /([\da-f:]+)$/i 0abc @@ -728,7 +725,7 @@ 5f03:12C0::932e fed def Any old stuff - *** Failers +\= Expect no match 0zzz gzzz fed\x20 @@ -737,7 +734,7 @@ /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ .1.2.3 A.12.123.0 - *** Failers +\= Expect no match .1.2.3333 1.2.3 1234.2.3 @@ -745,7 +742,7 @@ /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ 1 IN SOA non-sp1 non-sp2( 1 IN SOA non-sp1 non-sp2 ( - *** Failers +\= Expect no match 1IN SOA non-sp1 non-sp2( /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/ @@ -755,7 +752,7 @@ ab-c.pq-r. sxk.zzz.ac.uk. x-.y-. - *** Failers +\= Expect no match -abc.peq. /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/ @@ -763,7 +760,7 @@ *.b0-a *.c3-b.c *.c-a.b-c - *** Failers +\= Expect no match *.0 *.a- *.a-b.c- @@ -787,29 +784,28 @@ \"1234\" \"abcd\" ; \"\" ; rhubarb - *** Failers +\= Expect no match \"1234\" : things /^$/ \ - *** Failers / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x ab c - *** Failers +\= Expect no match abc ab cde /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/ ab c - *** Failers +\= Expect no match abc ab cde /^ a\ b[c ]d $/x a bcd a b d - *** Failers +\= Expect no match abcd ab d @@ -863,7 +859,7 @@ 1234567890 12345678ab 12345678__ - *** Failers +\= Expect no match 1234567 /^[aeiou\d]{4,5}$/ @@ -871,7 +867,7 @@ 1234 12345 aaaaa - *** Failers +\= Expect no match 123456 /^[aeiou\d]{4,5}?/ @@ -887,7 +883,7 @@ /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/ From abcd Mon Sep 01 12:33:02 1997 From abcd Mon Sep 1 12:33:02 1997 - *** Failers +\= Expect no match From abcd Sep 01 12:33:02 1997 /^12.34/s @@ -908,7 +904,7 @@ /^(\D*)(?=\d)(?!123)/ abc456 - *** Failers +\= Expect no match abc123 /^1234(?# test newlines @@ -928,12 +924,12 @@ /(?!^)abc/ the abc - *** Failers +\= Expect no match abc /(?=^)abc/ abc - *** Failers +\= Expect no match the abc /^[ab]{1,3}(ab*|b)/no_auto_possess @@ -1149,7 +1145,7 @@ A. Other (a comment) \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay A missing angle (a comment) \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay A missing angle .*/)foo" +\= Expect no match /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ "(?>.*/)foo" @@ -2397,12 +2401,12 @@ /(?>(\.\d\d[1-9]?))\d+/ 1.230003938 1.875000282 - *** Failers +\= Expect no match 1.235 /^((?>\w+)|(?>\s+))*$/ now is the time for all good men to come to the aid of the party - *** Failers +\= Expect no match this is not a line with only words and spaces! /(\d+)(\w)/ @@ -2411,7 +2415,7 @@ /((?>\d+))(\w)/ 12345a - *** Failers +\= Expect no match 12345+ /(?>a+)b/ @@ -2438,32 +2442,32 @@ /\(((?>[^()]+)|\([^()]+\))+\)/ (abc) (abc(def)xyz) - *** Failers +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /a(?-i)b/i ab Ab - *** Failers +\= Expect no match aB AB /(a (?x)b c)d e/ a bcd e - *** Failers +\= Expect no match a b cd e abcd e a bcde /(a b(?x)c d (?-x)e f)/ a bcde f - *** Failers +\= Expect no match abcdef /(a(?i)b)c/ abc aBc - *** Failers +\= Expect no match abC aBC Abc @@ -2474,7 +2478,7 @@ /a(?i:b)c/ abc aBc - *** Failers +\= Expect no match ABC abC aBC @@ -2482,14 +2486,14 @@ /a(?i:b)*c/ aBc aBBc - *** Failers +\= Expect no match aBC aBBC /a(?=b(?i)c)\w\wd/ abcd abCd - *** Failers +\= Expect no match aBCd abcD @@ -2497,7 +2501,7 @@ more than million more than MILLION more \n than Million - *** Failers +\= Expect no match MORE THAN MILLION more \n than \n million @@ -2505,7 +2509,7 @@ more than million more than MILLION more \n than Million - *** Failers +\= Expect no match MORE THAN MILLION more \n than \n million @@ -2513,7 +2517,7 @@ abc aBbc aBBc - *** Failers +\= Expect no match Abc abAb abbC @@ -2521,7 +2525,7 @@ /(?=a(?i)b)\w\wc/ abc aBc - *** Failers +\= Expect no match Ab abC aBC @@ -2529,7 +2533,7 @@ /(?<=a(?i)b)(\w\w)c/ abxxc aBxxc - *** Failers +\= Expect no match Abxxc ABxxc abxxC @@ -2537,14 +2541,14 @@ /^(?(?=abc)\w{3}:|\d\d)$/ abc: 12 - *** Failers +\= Expect no match 123 xyz /^(?(?!abc)\d\d|\w{3}:)$/ abc: 12 - *** Failers +\= Expect no match 123 xyz @@ -2553,7 +2557,7 @@ cat fcat focat - *** Failers +\= Expect no match foocat /(?(?a*)*/ @@ -2630,7 +2634,7 @@ /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x 12-sep-98 12-09-98 - *** Failers +\= Expect no match sep-12-98 /(?i:saturday|sunday)/ @@ -2647,7 +2651,7 @@ aBCx bbx BBx - *** Failers +\= Expect no match abcX aBCX bbX @@ -2661,7 +2665,7 @@ Europe frog France - *** Failers +\= Expect no match Africa /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/ @@ -2671,13 +2675,13 @@ xY zebra Zambesi - *** Failers +\= Expect no match aCD XY /(?<=foo\n)^bar/m foo\nbar - *** Failers +\= Expect no match bar baz\nbar @@ -2685,18 +2689,18 @@ barbaz barbarbaz koobarbaz - *** Failers +\= Expect no match baz foobarbaz -/The following tests are taken from the Perl 5.005 test suite; some of them/ -/are compatible with 5.004, but I'd rather not have to sort them out./ +# The following tests are taken from the Perl 5.005 test suite; some of them +# are compatible with 5.004, but I'd rather not have to sort them out. /abc/ abc xabcy ababc - *** Failers +\= Expect no match xbc axc abx @@ -2720,7 +2724,7 @@ /ab+bc/ abbc - *** Failers +\= Expect no match abc abq @@ -2737,7 +2741,7 @@ abbbbc /ab{4,5}bc/ - *** Failers +\= Expect no match abq abbbbc @@ -2758,7 +2762,7 @@ /^abc$/ abc - *** Failers +\= Expect no match abbbbc abcc @@ -2769,8 +2773,8 @@ /abc$/ aabc - *** Failers aabc +\= Expect no match aabcd /^/ @@ -2788,7 +2792,7 @@ /a[bc]d/ abd - *** Failers +\= Expect no match axyzd abc @@ -2812,7 +2816,7 @@ /a[^bc]d/ aed - *** Failers +\= Expect no match abd abd @@ -2821,8 +2825,8 @@ /a[^]b]c/ adc - *** Failers a-c +\= Expect no match a]c /\ba\b/ @@ -2831,13 +2835,13 @@ -a- /\by\b/ - *** Failers +\= Expect no match xy yz xyz /\Ba\B/ - *** Failers +\= Expect no match a- -a -a- @@ -2856,8 +2860,7 @@ /\W/ - - *** Failers - - +\= Expect no match a /a\sb/ @@ -2865,8 +2868,7 @@ /a\Sb/ a-b - *** Failers - a-b +\= Expect no match a b /\d/ @@ -2874,8 +2876,7 @@ /\D/ - - *** Failers - - +\= Expect no match 1 /[\w]/ @@ -2883,8 +2884,7 @@ /[\W]/ - - *** Failers - - +\= Expect no match a /a[\s]b/ @@ -2892,8 +2892,7 @@ /a[\S]b/ a-b - *** Failers - a-b +\= Expect no match a b /[\d]/ @@ -2901,8 +2900,7 @@ /[\D]/ - - *** Failers - - +\= Expect no match 1 /ab|cd/ @@ -2922,6 +2920,8 @@ a((b /a\\b/ + a\\b +\= Expect no match a\b /((a))/ @@ -2961,12 +2961,10 @@ cde /abc/ - *** Failers +\= Expect no match b - /a*/ - /([abc])*d/ abbbcd @@ -3020,7 +3018,7 @@ adcdcde /a[bcd]+dcdcde/ - *** Failers +\= Expect no match abcde adcdcde @@ -3040,7 +3038,7 @@ effgz ij reffgz - *** Failers +\= Expect no match effg bcdd @@ -3051,7 +3049,7 @@ a /multiple words of text/ - *** Failers +\= Expect no match aa uh-uh @@ -3079,7 +3077,7 @@ ABC XABCY ABABC - *** Failers +\= Expect no match aaxabxbaxbbx XBC AXC @@ -3102,7 +3100,7 @@ ABBC /ab+bc/i - *** Failers +\= Expect no match ABC ABQ @@ -3121,7 +3119,7 @@ ABBBBC /ab{4,5}?bc/i - *** Failers +\= Expect no match ABQ ABBBBC @@ -3142,7 +3140,7 @@ /^abc$/i ABC - *** Failers +\= Expect no match ABBBBC ABCC @@ -3168,8 +3166,8 @@ AXYZC /a.*c/i - *** Failers AABC +\= Expect no match AXYZD /a[bc]d/i @@ -3177,7 +3175,7 @@ /a[b-d]e/i ACE - *** Failers +\= Expect no match ABC ABD @@ -3201,7 +3199,7 @@ /a[^-b]c/i ADC - *** Failers +\= Expect no match ABD A-C @@ -3216,7 +3214,7 @@ DEF /$b/i - *** Failers +\= Expect no match A]C B @@ -3228,6 +3226,7 @@ A((B /a\\b/i +\= Expect no match A\=notbol /((a))/i @@ -3278,7 +3277,6 @@ /abc/i /a*/i - /([abc])*d/i ABBBCD @@ -3306,6 +3304,7 @@ HIJ /^(ab|cd)e/i +\= Expect no match ABCDE /(abc|)ef/i @@ -3350,7 +3349,7 @@ EFFGZ IJ REFFGZ - *** Failers +\= Expect no match ADCDCDE EFFG BCDD @@ -3368,7 +3367,7 @@ C /multiple words of text/i - *** Failers +\= Expect no match AA UH-UH @@ -3461,7 +3460,7 @@ /(?<=a)b/ ab - *** Failers +\= Expect no match cb b @@ -3507,7 +3506,7 @@ Ab /(?:(?i)a)b/ - *** Failers +\= Expect no match cb aB @@ -3526,7 +3525,7 @@ Ab /(?i:a)b/ - *** Failers +\= Expect no match aB aB @@ -3545,8 +3544,8 @@ aB /(?:(?-i)a)b/i - *** Failers aB +\= Expect no match Ab /((?-i)a)b/i @@ -3558,7 +3557,7 @@ aB /(?:(?-i)a)b/i - *** Failers +\= Expect no match Ab AB @@ -3577,7 +3576,7 @@ aB /(?-i:a)b/i - *** Failers +\= Expect no match AB Ab @@ -3590,14 +3589,14 @@ aB /(?-i:a)b/i - *** Failers +\= Expect no match Ab AB /((?-i:a))b/i /((?-i:a.))b/i - *** Failers +\= Expect no match AB a\nB @@ -3623,7 +3622,7 @@ aaac /(?.*)(?<=(abcd|wxyz))/ alphabetabcd endingwxyz - *** Failers +\= Expect no match a rather long string that doesn't end with one of them /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/ word cat dog elephant mussel cow horse canary baboon snake shark otherword +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark /word (?>[a-zA-Z0-9]+ ){0,30}otherword/ +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope /(?<=\d{3}(?!999))foo/ 999foo 123999foo - *** Failers +\= Expect no match 123abcfoo /(?<=(?!...999)\d{3})foo/ 999foo 123999foo - *** Failers +\= Expect no match 123abcfoo /(?<=\d{3}(?!999)...)foo/ 123abcfoo 123456foo - *** Failers +\= Expect no match 123999foo /(?<=\d{3}...)(? - ** Failers +\= Expect no match xyz\nabclf xyz\rabclf /^abc/Im,newline=cr xyz\rabc - ** Failers +\= Expect no match xyz\nabc xyz\r\nabc @@ -4067,34 +4070,37 @@ aaaa /(a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /(?>a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /(?:a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /^a.b/newline=lf a\rb - ** Failers +\= Expect no match a\nb /^a.b/newline=cr a\nb - ** Failers +\= Expect no match a\rb /^a.b/newline=anycrlf a\x85b - ** Failers +\= Expect no match a\rb /^a.b/newline=any - ** Failers +\= Expect no match a\nb a\rb a\x85b @@ -4112,7 +4118,7 @@ a\x0bb a\x0cb a\x85b - ** Failers +\= Expect no match a\n\rb /^a\R*b/bsr=unicode @@ -4135,7 +4141,7 @@ a\x85b a\n\rb a\n\r\x85\x0cb - ** Failers +\= Expect no match ab /^a\R{1,3}b/bsr=unicode @@ -4146,25 +4152,25 @@ a\r\n\r\n\r\nb a\n\r\n\rb a\n\n\r\nb - ** Failers +\= Expect no match a\n\n\n\rb a\r /.+foo/ afoo - ** Failers +\= Expect no match \r\nfoo \nfoo /.+foo/newline=crlf afoo \nfoo - ** Failers +\= Expect no match \r\nfoo /.+foo/newline=any afoo - ** Failers +\= Expect no match \nfoo \r\nfoo @@ -4176,12 +4182,12 @@ /^$/gm,newline=any abc\r\rxyz abc\n\rxyz - ** Failers +\= Expect no match abc\r\nxyz /^X/m XABC - ** Failers +\= Expect no match XABC\=notbol /(?m)^$/g,newline=any,aftertext @@ -4208,20 +4214,20 @@ /(?|(abc)|(xyz))(?1)/ abcabc xyzabc - ** Failers +\= Expect no match xyzxyz /\H\h\V\v/ X X\x0a X\x09X\x0b - ** Failers +\= Expect no match \xa0 X\x0a /\H*\h+\V?\v{3,4}/ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a \x09\x20\xa0\x0a\x0b\x0c - ** Failers +\= Expect no match \x09\x20\xa0\x0a\x0b /\H{3,4}/ @@ -4234,7 +4240,7 @@ /\h*X\h?\H+Y\H?Z/ >XNNNYZ > X NYQZ - ** Failers +\= Expect no match >XYZ > X NY Z @@ -4243,6 +4249,7 @@ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c /.+A/newline=crlf +\= Expect no match \r\nA /\nA/newline=crlf @@ -4258,7 +4265,7 @@ a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x85b a\x0bb @@ -4273,7 +4280,7 @@ a\rb a\nb a\r\nb - ** Failers +\= Expect no match a\x85b a\x0bb @@ -4288,49 +4295,49 @@ a\r\n\nb a\n\r\rb a\r\n\r\n\r\n\r\nb - ** Failers +\= Expect no match + a\x0b\x0bb a\x85\x85b - a\x0b\0bb /a\R{2,4}b/I,bsr=unicode a\r\rb a\n\n\nb a\r\n\n\r\rb a\x85\x85b - a\x0b\0bb - ** Failers + a\x0b\x0bb +\= Expect no match a\r\r\r\r\rb /a(?!)|\wbc/ abc /a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers +\= Expect no match ab /a[^]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames aXb a\nb - ** Failers +\= Expect no match ab /a[^]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames aXb a\nX\nXb - ** Failers +\= Expect no match ab /X$/dollar_endonly X - ** Failers +\= Expect no match X\n /X$/ @@ -4340,13 +4347,13 @@ /xyz/auto_callout xyz abcxyz - ** Failers +\= Expect no match abc abcxypqr /xyz/auto_callout,no_start_optimize abcxyz - ** Failers +\= Expect no match abc abcxypqr @@ -4370,10 +4377,12 @@ ++++123999Y\=ps /Z(*F)/ +\= Expect no match Z\=ps ZA\=ps /Z(?!)/ +\= Expect no match Z\=ps ZA\=ps @@ -4395,6 +4404,7 @@ /Z(*F)Q|ZXY/ Z\=ps +\= Expect no match ZA\=ps X\=ps @@ -4433,13 +4443,13 @@ /(abc|def|xyz)/I terhjk;abcdaadsfe the quick xyz brown fox - ** Failers +\= Expect no match thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd /(abc|def|xyz)/I,no_start_optimize terhjk;abcdaadsfe the quick xyz brown fox - ** Failers +\= Expect no match thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd /abcd*/aftertext @@ -4466,13 +4476,13 @@ /(?:(?1)|B)(A(*F)|C)/ ABCD CCD - ** Failers +\= Expect no match CAD /^(?:(?1)|B)(A(*F)|C)/ CCD BCD - ** Failers +\= Expect no match ABCD CAD BAD @@ -4481,7 +4491,6 @@ ac /^(?=a(*SKIP)b|ac)/ - ** Failers ac /^(?=a(*THEN)b|ac)/ @@ -4489,8 +4498,6 @@ /^(?=a(*PRUNE)b)/ ab - ** Failers - ac /^(?(?!a(*SKIP)b))/ ac @@ -4527,68 +4534,71 @@ abc\=ph /abc\B/ - abc abc\=ps abc\=ph +\= Expect no match + abc /.+/ abc\=offset=0 abc\=offset=1 abc\=offset=2 - abc\=offset=3 +\= Bad offsets abc\=offset=4 abc\=offset=-4 +\= Expect no match + abc\=offset=3 /^(?:a)++\w/ aaaab - ** Failers +\= Expect no match aaaa bbb /^(?:aa|(?:a)++\w)/ aaaab aaaa - ** Failers +\= Expect no match bbb /^(?:a)*+\w/ aaaab bbb - ** Failers +\= Expect no match aaaa /^(a)++\w/ aaaab - ** Failers +\= Expect no match aaaa bbb /^(a|)++\w/ aaaab - ** Failers +\= Expect no match aaaa bbb /(?=abc){3}abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc)+abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc)++abc/aftertext abcabcabc - ** Failers +\= Expect no match xyz /(?=abc){0}xyz/ xyz /(?=abc){1}xyz/ - ** Failers +\= Expect no match xyz /(?=(a))?./ @@ -4849,6 +4859,7 @@ /(?(?!)a|b)/ bbb +\= Expect no match aaa /^/gm diff --git a/testdata/testinput7 b/testdata/testinput7 index 70d8599..e988532 100644 --- a/testdata/testinput7 +++ b/testdata/testinput7 @@ -16,19 +16,19 @@ /a\x{100}+b/utf a\x{100}b a\x{100}\x{100}b - *** Failers +\= Expect no match ab /\bX/utf Xoanon +Xoanon \x{300}Xoanon - *** Failers +\= Expect no match YXoanon /\BX/utf YXoanon - *** Failers +\= Expect no match Xoanon +Xoanon \x{300}Xoanon @@ -37,12 +37,12 @@ X+oanon ZX\x{300}oanon FAX - *** Failers +\= Expect no match Xoanon /X\B/utf Xoanon - *** Failers +\= Expect no match X+oanon ZX\x{300}oanon FAX @@ -55,7 +55,7 @@ ab99 \x{123}\x{123}45 \x{400}\x{401}\x{402}6 - *** Failers +\= Expect no match d99 \x{123}\x{122}4 \x{400}\x{403}6 @@ -65,14 +65,14 @@ acb a\x7fb a\x{100}b - *** Failers +\= Expect no match a\nb /a(.{3})b/utf a\x{4000}xyb a\x{4000}\x7fyb a\x{4000}\x{100}yb - *** Failers +\= Expect no match a\x{4000}b ac\ncb @@ -110,7 +110,7 @@ a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b - *** Failers +\= Expect no match a\x{1234}b ac\ncb @@ -120,7 +120,7 @@ a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers +\= Expect no match a\x{1234}b /a(.{3,}?)b/utf @@ -129,7 +129,7 @@ a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers +\= Expect no match a\x{1234}b /a(.{3,5})b/utf @@ -140,7 +140,7 @@ a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb - *** Failers +\= Expect no match a\x{1234}b axxxxxxbcdefghijb @@ -152,12 +152,12 @@ a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb - *** Failers +\= Expect no match a\x{1234}b axxxxxxbcdefghijb /^[a\x{c0}]/utf - *** Failers +\= Expect no match \x{100} /(?<=aXb)cd/utf @@ -171,19 +171,19 @@ /(?:\x{100}){3}b/utf \x{100}\x{100}\x{100}b - *** Failers +\= Expect no match \x{100}\x{100}b /\x{ab}/utf \x{ab} \xc2\xab - *** Failers +\= Expect no match \x00{ab} /(?<=(.))X/utf WXYZ \x{256}XYZ - *** Failers +\= Expect no match XYZ /[^a]+/g,utf @@ -270,128 +270,122 @@ /\D+/utf 12abcd34 - *** Failers +\= Expect no match 1234 /\D{2,3}/utf 12abcd34 12ab34 - *** Failers +\= Expect no match 1234 12a34 /\D{2,3}?/utf 12abcd34 12ab34 - *** Failers +\= Expect no match 1234 12a34 /\d+/utf 12abcd34 - *** Failers /\d{2,3}/utf 12abcd34 1234abcd - *** Failers +\= Expect no match 1.4 /\d{2,3}?/utf 12abcd34 1234abcd - *** Failers +\= Expect no match 1.4 /\S+/utf 12abcd34 - *** Failers +\= Expect no match \ \ /\S{2,3}/utf 12abcd34 1234abcd - *** Failers +\= Expect no match \ \ /\S{2,3}?/utf 12abcd34 1234abcd - *** Failers +\= Expect no match \ \ />\s+ <34 - *** Failers />\s{2,3} \s{2,3}? \p{Xsp}/utf >\x{1680}\x{2028}\x{0b} - ** Failers +\= Expect no match \x{0b} /^>\p{Xsp}+/utf,no_auto_possess @@ -1618,7 +1606,7 @@ /^>\p{Xps}/utf >\x{1680}\x{2028}\x{0b} >\x{a0} - ** Failers +\= Expect no match \x{0b} /^>\p{Xps}+/utf @@ -1649,7 +1637,7 @@ \x{a6c} \x{10a7} _ABC - ** Failers +\= Expect no match [] /^\p{Xwd}+/utf @@ -1668,7 +1656,7 @@ \x{a6c} \x{10a7} _ABC - ** Failers +\= Expect no match [] /^[\p{Xwd}]+/utf @@ -1687,7 +1675,7 @@ /\b...\B/utf abc_ - ** Failers +\= Expect no match \x{37e}abc\x{376} \x{37e}\x{376}\x{371}\x{393}\x{394} !\x{c0}++\x{c1}\x{c2} @@ -1749,7 +1737,7 @@ \x{1100}X \x{1100}\x{34e}X \x{1b04}\x{1b04}X - *These match up to the roman letters +\= These match up to the roman letters \x{1111}\x{1111}L,L \x{1111}\x{1111}\x{1169}L,L,V \x{1111}\x{ae4c}L, LV @@ -1760,7 +1748,7 @@ \x{1111}\x{ad89}\x{11fe}L, LVT, T \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T \x{ad89}\x{11fe}\x{11fe}LVT, T, T - *These match just the first codepoint (invalid sequence) +\= These match just the first codepoint (invalid sequence) \x{1111}\x{11fe}L, T \x{ae4c}\x{1111}LV, L \x{ae4c}\x{ae4c}LV, LV @@ -1776,18 +1764,18 @@ \x{11fe}\x{1169}T, V \x{11fe}\x{ae4c}T, LV \x{11fe}\x{ad89}T, LVT - *Test extend and spacing mark +\= Test extend and spacing mark \x{1111}\x{ae4c}\x{0711}L, LV, extend \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark - *Test CR, LF, and control +\= Test CR, LF, and control \x0d\x{0711}CR, extend \x0d\x{1b04}CR, spacingmark \x0a\x{0711}LF, extend \x0a\x{1b04}LF, spacingmark \x0b\x{0711}Control, extend \x09\x{1b04}Control, spacingmark - *There are no Prepend characters, so we can't test Prepend, CR +\= There are no Prepend characters, so we can't test Prepend, CR /^(?>\X{2})X/utf,aftertext \x{1111}\x{ae4c}\x{1111}\x{ae4c}X @@ -1841,7 +1829,6 @@ /\x{212b}+/i,utf \x{00c5}\x{00e5}\x{212b} - /\x{01c4}+/i,utf \x{01c4}\x{01c5}\x{01c6} @@ -1851,7 +1838,6 @@ /\x{01c6}+/i,utf \x{01c4}\x{01c5}\x{01c6} - /\x{01c7}+/i,utf \x{01c7}\x{01c8}\x{01c9} @@ -1871,7 +1857,6 @@ /\x{01cc}+/i,utf \x{01ca}\x{01cb}\x{01cc} - /\x{01f1}+/i,utf \x{01f1}\x{01f2}\x{01f3} @@ -1881,7 +1866,6 @@ /\x{01f3}+/i,utf \x{01f1}\x{01f2}\x{01f3} - /\x{0345}+/i,utf \x{0345}\x{0399}\x{03b9}\x{1fbe} @@ -1894,7 +1878,6 @@ /\x{1fbe}+/i,utf \x{0345}\x{0399}\x{03b9}\x{1fbe} - /\x{0392}+/i,utf \x{0392}\x{03b2}\x{03d0} @@ -1914,7 +1897,6 @@ /\x{03f5}+/i,utf \x{0395}\x{03b5}\x{03f5} - /\x{0398}+/i,utf \x{0398}\x{03b8}\x{03d1}\x{03f4} @@ -1926,7 +1908,6 @@ /\x{03f4}+/i,utf \x{0398}\x{03b8}\x{03d1}\x{03f4} - /\x{039a}+/i,utf \x{039a}\x{03ba}\x{03f0} @@ -1937,7 +1918,6 @@ /\x{03f0}+/i,utf \x{039a}\x{03ba}\x{03f0} - /\x{03a0}+/i,utf \x{03a0}\x{03c0}\x{03d6} @@ -1947,7 +1927,6 @@ /\x{03d6}+/i,utf \x{03a0}\x{03c0}\x{03d6} - /\x{03a1}+/i,utf \x{03a1}\x{03c1}\x{03f1} @@ -1957,7 +1936,6 @@ /\x{03f1}+/i,utf \x{03a1}\x{03c1}\x{03f1} - /\x{03a3}+/i,utf \x{03A3}\x{03C2}\x{03C3} @@ -1966,7 +1944,6 @@ /\x{03c3}+/i,utf \x{03A3}\x{03C2}\x{03C3} - /\x{03a6}+/i,utf \x{03a6}\x{03c6}\x{03d5} @@ -1977,7 +1954,6 @@ /\x{03d5}+/i,utf \x{03a6}\x{03c6}\x{03d5} - /\x{03c9}+/i,utf \x{03c9}\x{03a9}\x{2126} @@ -1987,7 +1963,6 @@ /\x{2126}+/i,utf \x{03c9}\x{03a9}\x{2126} - /\x{1e60}+/i,utf \x{1e60}\x{1e61}\x{1e9b} @@ -1997,14 +1972,12 @@ /\x{1e9b}+/i,utf \x{1e60}\x{1e61}\x{1e9b} - /\x{1e9e}+/i,utf \x{1e9e}\x{00df} /\x{00df}+/i,utf \x{1e9e}\x{00df} - /\x{1f88}+/i,utf \x{1f88}\x{1f80} @@ -2020,7 +1993,6 @@ /\x{212a}+/i,utf \x{004b}\x{006b}\x{212a} - /\x{0053}+/i,utf \x{0053}\x{0073}\x{017f} @@ -2031,19 +2003,24 @@ \x{0053}\x{0073}\x{017f} /ist/i,utf +\= Expect no match ikt /is+t/i,utf iSs\x{17f}t +\= Expect no match ikt /is+?t/i,utf +\= Expect no match ikt /is?t/i,utf +\= Expect no match ikt /is{2}t/i,utf +\= Expect no match iskt /^\p{Xuc}/utf @@ -2051,52 +2028,52 @@ @abc `abc \x{1234}abc - ** Failers +\= Expect no match abc /^\p{Xuc}+/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}+?/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}+?\*/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}++/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}{3,5}/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\p{Xuc}{3,5}?/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^[\p{Xuc}]/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^[\p{Xuc}]+/utf $@`\x{a0}\x{1234}\x{e000}** - ** Failers +\= Expect no match \x{9f} /^\P{Xuc}/utf abc - ** Failers +\= Expect no match $abc @abc `abc @@ -2104,7 +2081,7 @@ /^[\P{Xuc}]/utf abc - ** Failers +\= Expect no match $abc @abc `abc diff --git a/testdata/testinput9 b/testdata/testinput9 index 4d4bbe3..594b6b2 100644 --- a/testdata/testinput9 +++ b/testdata/testinput9 @@ -7,7 +7,7 @@ /a\Cb/ aXb a\nb - ** Failers (too big char) +\= Expect no match and error message (too big char) A\x{123}B A\o{443}B diff --git a/testdata/testoutput1 b/testdata/testoutput1 index 1fe3d9d..d28bf91 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -9,10 +9,11 @@ /the quick brown fox/ the quick brown fox 0: the quick brown fox - The quick brown FOX -No match What do you know about the quick brown fox? 0: the quick brown fox +\= Expect no match + The quick brown FOX +No match What do you know about THE QUICK BROWN FOX? No match @@ -91,8 +92,7 @@ No match 0: aaaabxyzpqrrrabbxyyyypqAzz >>>>abcxyzpqrrrabbxyyyypqAzz 0: abcxyzpqrrrabbxyyyypqAzz - *** Failers -No match +\= Expect no match abxyzpqrrabbxyyyypqAzz No match abxyzpqrrrrabbxyyyypqAzz @@ -113,8 +113,7 @@ No match abcabczz 0: abcabczz 1: abc - *** Failers -No match +\= Expect no match zz No match abcabcabczz @@ -147,8 +146,7 @@ No match bbbbbbbbbbbac 0: bbbbbbbbbbbac 1: a - *** Failers -No match +\= Expect no match aaac No match abbbbbbbbbbbac @@ -179,8 +177,7 @@ No match bbbbbbbbbbbac 0: bbbbbbbbbbbac 1: a - *** Failers -No match +\= Expect no match aaac No match abbbbbbbbbbbac @@ -201,8 +198,7 @@ No match bababc 0: bababc 1: ba - *** Failers -No match +\= Expect no match bababbc No match babababc @@ -218,8 +214,7 @@ No match bababc 0: bababc 1: ba - *** Failers -No match +\= Expect no match bababbc No match babababc @@ -242,8 +237,7 @@ No match 0: d ething 0: e - *** Failers -No match +\= Expect no match fthing No match [thing @@ -260,8 +254,7 @@ No match 0: d ething 0: e - *** Failers -No match +\= Expect no match athing No match fthing @@ -274,8 +267,7 @@ No match 0: [ \\thing 0: \ - *** Failers - 0: * +\= Expect no match athing No match bthing @@ -294,8 +286,7 @@ No match 0: a fthing 0: f - *** Failers - 0: * +\= Expect no match ]thing No match cthing @@ -338,8 +329,7 @@ No match 0: 10 100 0: 100 - *** Failers -No match +\= Expect no match abc No match @@ -356,46 +346,42 @@ No match 0: xxx0 xxx1234 0: xxx1234 - *** Failers -No match +\= Expect no match xxx No match /^.+[0-9][0-9][0-9]$/ x123 0: x123 + x1234 + 0: x1234 xx123 0: xx123 123456 0: 123456 - *** Failers -No match +\= Expect no match 123 No match - x1234 - 0: x1234 /^.+?[0-9][0-9][0-9]$/ x123 0: x123 + x1234 + 0: x1234 xx123 0: xx123 123456 0: 123456 - *** Failers -No match +\= Expect no match 123 No match - x1234 - 0: x1234 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ abc!pqr=apquxz.ixr.zzz.ac.uk 0: abc!pqr=apquxz.ixr.zzz.ac.uk 1: abc 2: pqr - *** Failers -No match +\= Expect no match !pqr=apquxz.ixr.zzz.ac.uk No match abc!=apquxz.ixr.zzz.ac.uk @@ -408,7 +394,8 @@ No match /:/ Well, we need a colon: somewhere 0: : - *** Fail if we don't +\= Expect no match + Fail without a colon No match /([\da-f:]+)$/i @@ -436,8 +423,7 @@ No match Any old stuff 0: ff 1: ff - *** Failers -No match +\= Expect no match 0zzz No match gzzz @@ -458,8 +444,7 @@ No match 1: 12 2: 123 3: 0 - *** Failers -No match +\= Expect no match .1.2.3333 No match 1.2.3 @@ -478,8 +463,7 @@ No match 1: 1 2: non-sp1 3: non-sp2 - *** Failers -No match +\= Expect no match 1IN SOA non-sp1 non-sp2( No match @@ -499,8 +483,7 @@ No match x-.y-. 0: x-.y-. 1: .y- - *** Failers -No match +\= Expect no match -abc.peq. No match @@ -519,8 +502,7 @@ No match 1: -a 2: .b-c 3: -c - *** Failers -No match +\= Expect no match *.0 No match *.a- @@ -571,22 +553,21 @@ No match \"\" ; rhubarb 0: "" ; rhubarb 1: ; rhubarb - *** Failers -No match +\= Expect no match \"1234\" : things No match /^$/ \ 0: - *** Failers +\= Expect no match + A non-empty line No match / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x ab c 0: ab c - *** Failers -No match +\= Expect no match abc No match ab cde @@ -595,8 +576,7 @@ No match /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/ ab c 0: ab c - *** Failers -No match +\= Expect no match abc No match ab cde @@ -607,8 +587,7 @@ No match 0: a bcd a b d 0: a b d - *** Failers -No match +\= Expect no match abcd No match ab d @@ -717,8 +696,7 @@ No match 0: 12345678ab 12345678__ 0: 12345678__ - *** Failers -No match +\= Expect no match 1234567 No match @@ -731,8 +709,7 @@ No match 0: 12345 aaaaa 0: aaaaa - *** Failers -No match +\= Expect no match 123456 No match @@ -757,8 +734,7 @@ No match 0: def=defdefdef 1: def 2: def - *** Failers -No match +\= Expect no match abc=defdef No match @@ -828,8 +804,7 @@ No match From abcd Mon Sep 1 12:33:02 1997 0: From abcd Mon Sep 1 12:33 1: Sep - *** Failers -No match +\= Expect no match From abcd Sep 01 12:33:02 1997 No match @@ -866,8 +841,7 @@ No match abc456 0: abc 1: abc - *** Failers -No match +\= Expect no match abc123 No match @@ -911,16 +885,14 @@ No match /(?!^)abc/ the abc 0: abc - *** Failers -No match +\= Expect no match abc No match /(?=^)abc/ abc 0: abc - *** Failers -No match +\= Expect no match the abc No match @@ -1152,8 +1124,7 @@ No match 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay A missing angle .*/)foo" - /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ -No match - "(?>.*/)foo" /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo +\= Expect no match + /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ +No match /(?>(\.\d\d[1-9]?))\d+/ 1.230003938 @@ -3065,8 +2991,7 @@ No match 1.875000282 0: .875000282 1: .875 - *** Failers -No match +\= Expect no match 1.235 No match @@ -3074,8 +2999,7 @@ No match now is the time for all good men to come to the aid of the party 0: now is the time for all good men to come to the aid of the party 1: party - *** Failers -No match +\= Expect no match this is not a line with only words and spaces! No match @@ -3094,8 +3018,7 @@ No match 0: 12345a 1: 12345 2: a - *** Failers -No match +\= Expect no match 12345+ No match @@ -3133,8 +3056,7 @@ No match (abc(def)xyz) 0: (abc(def)xyz) 1: xyz - *** Failers -No match +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -3143,8 +3065,7 @@ No match 0: ab Ab 0: Ab - *** Failers -No match +\= Expect no match aB No match AB @@ -3154,8 +3075,7 @@ No match a bcd e 0: a bcd e 1: a bc - *** Failers -No match +\= Expect no match a b cd e No match abcd e @@ -3167,8 +3087,7 @@ No match a bcde f 0: a bcde f 1: a bcde f - *** Failers -No match +\= Expect no match abcdef No match @@ -3179,8 +3098,7 @@ No match aBc 0: aBc 1: aB - *** Failers -No match +\= Expect no match abC No match aBC @@ -3199,8 +3117,7 @@ No match 0: abc aBc 0: aBc - *** Failers -No match +\= Expect no match ABC No match abC @@ -3213,8 +3130,7 @@ No match 0: aBc aBBc 0: aBBc - *** Failers -No match +\= Expect no match aBC No match aBBC @@ -3225,8 +3141,7 @@ No match 0: abcd abCd 0: abCd - *** Failers -No match +\= Expect no match aBCd No match abcD @@ -3239,8 +3154,7 @@ No match 0: more than MILLION more \n than Million 0: more \x0a than Million - *** Failers -No match +\= Expect no match MORE THAN MILLION No match more \n than \n million @@ -3253,8 +3167,7 @@ No match 0: more than MILLION more \n than Million 0: more \x0a than Million - *** Failers -No match +\= Expect no match MORE THAN MILLION No match more \n than \n million @@ -3267,8 +3180,7 @@ No match 0: aBbc aBBc 0: aBBc - *** Failers -No match +\= Expect no match Abc No match abAb @@ -3281,8 +3193,7 @@ No match 0: abc aBc 0: aBc - *** Failers -No match +\= Expect no match Ab No match abC @@ -3297,8 +3208,7 @@ No match aBxxc 0: xxc 1: xx - *** Failers -No match +\= Expect no match Abxxc No match ABxxc @@ -3312,8 +3222,7 @@ No match 1: a bB 0: bB - *** Failers -No match +\= Expect no match aB No match bA @@ -3327,8 +3236,7 @@ No match 0: b bb 0: bb - *** Failers -No match +\= Expect no match ab No match @@ -3342,8 +3250,7 @@ No match 0: 12 123 0: 12 - *** Failers -No match +\= Expect no match xyz No match @@ -3352,8 +3259,7 @@ No match 0: abc: 12 0: 12 - *** Failers -No match +\= Expect no match 123 No match xyz @@ -3368,8 +3274,7 @@ No match 0: cat focat 0: cat - *** Failers -No match +\= Expect no match foocat No match @@ -3382,8 +3287,7 @@ No match 0: cat focat 0: cat - *** Failers -No match +\= Expect no match foocat No match @@ -3422,8 +3326,7 @@ No match 0: 12aa 1: 1 2: 2 - *** Failers -No match +\= Expect no match 1234 No match @@ -3440,8 +3343,7 @@ No match blaH blaH 0: blaH blaH 1: blaH - *** Failers -No match +\= Expect no match blah BLAH No match Blah blah @@ -3609,8 +3511,7 @@ No match 0: 12-sep-98 12-09-98 0: 12-09-98 - *** Failers -No match +\= Expect no match sep-12-98 No match @@ -3621,8 +3522,7 @@ No match foobarfootling 0: barfoo 1: foo - *** Failers -No match +\= Expect no match foobar No match barfoo @@ -3657,8 +3557,7 @@ No match BBx 0: BBx 1: BB - *** Failers -No match +\= Expect no match abcX No match aBCX @@ -3690,8 +3589,7 @@ No match France 0: F 1: F - *** Failers -No match +\= Expect no match Africa No match @@ -3714,8 +3612,7 @@ No match Zambesi 0: Z 1: Z - *** Failers -No match +\= Expect no match aCD No match XY @@ -3724,8 +3621,7 @@ No match /(?<=foo\n)^bar/m foo\nbar 0: bar - *** Failers -No match +\= Expect no match bar No match baz\nbar @@ -3738,39 +3634,37 @@ No match 0: baz koobarbaz 0: baz - *** Failers -No match +\= Expect no match baz No match foobarbaz No match -/The cases of aaaa and aaaaaa are missed out below because Perl does things/ -/differently. We know that odd, and maybe incorrect, things happen with/ -No match -/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./ -No match +# The cases of aaaa and aaaaaa are missed out below because Perl does things +# differently. We know that odd, and maybe incorrect, things happen with +# recursive references in Perl, as far as 5.11.3 - see some stuff in test #2. /^(a\1?){4}$/ - a -No match - aa -No match - aaa -No match aaaaa 0: aaaaa 1: a aaaaaaa 0: aaaaaaa 1: a + aaaaaaaaaa + 0: aaaaaaaaaa + 1: aaaa +\= Expect no match + a +No match + aa +No match + aaa +No match aaaaaaaa No match aaaaaaaaa No match - aaaaaaaaaa - 0: aaaaaaaaaa - 1: aaaa aaaaaaaaaaa No match aaaaaaaaaaaa @@ -3781,16 +3675,10 @@ No match No match aaaaaaaaaaaaaaa No match - aaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaa No match /^(a\1?)(a\1?)(a\2?)(a\3?)$/ - a -No match - aa -No match - aaa -No match aaaa 0: aaaa 1: a @@ -3815,16 +3703,23 @@ No match 2: aa 3: aaa 4: a - aaaaaaaa -No match - aaaaaaaaa -No match aaaaaaaaaa 0: aaaaaaaaaa 1: a 2: aa 3: aaa 4: aaaa +\= Expect no match + a +No match + aa +No match + aaa +No match + aaaaaaaa +No match + aaaaaaaaa +No match aaaaaaaaaaa No match aaaaaaaaaaaa @@ -3838,9 +3733,8 @@ No match aaaaaaaaaaaaaaaa No match -/The following tests are taken from the Perl 5.005 test suite; some of them/ -/are compatible with 5.004, but I'd rather not have to sort them out./ -No match +# The following tests are taken from the Perl 5.005 test suite; some of them +# are compatible with 5.004, but I'd rather not have to sort them out. /abc/ abc @@ -3849,8 +3743,7 @@ No match 0: abc ababc 0: abc - *** Failers -No match +\= Expect no match xbc No match axc @@ -3885,8 +3778,7 @@ No match /ab+bc/ abbc 0: abbc - *** Failers -No match +\= Expect no match abc No match abq @@ -3911,8 +3803,7 @@ No match 0: abbbbc /ab{4,5}bc/ - *** Failers -No match +\= Expect no match abq No match abbbbc @@ -3941,8 +3832,7 @@ No match /^abc$/ abc 0: abc - *** Failers -No match +\= Expect no match abbbbc No match abcc @@ -3957,10 +3847,7 @@ No match /abc$/ aabc 0: abc - *** Failers -No match - aabc - 0: abc +\= Expect no match aabcd No match @@ -3985,8 +3872,7 @@ No match /a[bc]d/ abd 0: abd - *** Failers -No match +\= Expect no match axyzd No match abc @@ -4019,8 +3905,7 @@ No match /a[^bc]d/ aed 0: aed - *** Failers -No match +\= Expect no match abd No match abd @@ -4033,10 +3918,9 @@ No match /a[^]b]c/ adc 0: adc - *** Failers -No match a-c 0: a-c +\= Expect no match a]c No match @@ -4049,8 +3933,7 @@ No match 0: a /\by\b/ - *** Failers -No match +\= Expect no match xy No match yz @@ -4059,8 +3942,7 @@ No match No match /\Ba\B/ - *** Failers - 0: a +\= Expect no match a- No match -a @@ -4087,10 +3969,7 @@ No match /\W/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match a No match @@ -4101,10 +3980,7 @@ No match /a\Sb/ a-b 0: a-b - *** Failers -No match - a-b - 0: a-b +\= Expect no match a b No match @@ -4115,10 +3991,7 @@ No match /\D/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match 1 No match @@ -4129,10 +4002,7 @@ No match /[\W]/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match a No match @@ -4143,10 +4013,7 @@ No match /a[\S]b/ a-b 0: a-b - *** Failers -No match - a-b - 0: a-b +\= Expect no match a b No match @@ -4157,10 +4024,7 @@ No match /[\D]/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match 1 No match @@ -4250,14 +4114,13 @@ No match 0: cde /abc/ - *** Failers -No match +\= Expect no match b No match - /a*/ - + \ + 0: /([abc])*d/ abbbcd @@ -4342,8 +4205,7 @@ No match 0: adcdcde /a[bcd]+dcdcde/ - *** Failers -No match +\= Expect no match abcde No match adcdcde @@ -4381,8 +4243,7 @@ No match reffgz 0: effgz 1: effgz - *** Failers -No match +\= Expect no match effg No match bcdd @@ -4430,8 +4291,7 @@ No match 9: a /multiple words of text/ - *** Failers -No match +\= Expect no match aa No match uh-uh @@ -4481,13 +4341,11 @@ No match /(a)|\1/ a 0: a - 1: a - *** Failers - 0: a 1: a ab 0: a 1: a +\= Expect no match x No match @@ -4524,8 +4382,7 @@ No match 0: ABC ABABC 0: ABC - *** Failers -No match +\= Expect no match aaxabxbaxbbx No match XBC @@ -4558,8 +4415,7 @@ No match 0: ABBC /ab+bc/i - *** Failers -No match +\= Expect no match ABC No match ABQ @@ -4584,8 +4440,7 @@ No match 0: ABBBBC /ab{4,5}?bc/i - *** Failers -No match +\= Expect no match ABQ No match ABBBBC @@ -4614,8 +4469,7 @@ No match /^abc$/i ABC 0: ABC - *** Failers -No match +\= Expect no match ABBBBC No match ABCC @@ -4650,10 +4504,9 @@ No match 0: AXYZC /a.*c/i - *** Failers -No match AABC 0: AABC +\= Expect no match AXYZD No match @@ -4664,8 +4517,7 @@ No match /a[b-d]e/i ACE 0: ACE - *** Failers -No match +\= Expect no match ABC No match ABD @@ -4698,8 +4550,7 @@ No match /a[^-b]c/i ADC 0: ADC - *** Failers -No match +\= Expect no match ABD No match A-C @@ -4721,8 +4572,7 @@ No match 1: /$b/i - *** Failers -No match +\= Expect no match A]C No match B @@ -4814,11 +4664,6 @@ No match CDE 0: CDE -/abc/i - -/a*/i - - /([abc])*d/i ABBBCD 0: ABBBCD @@ -4858,6 +4703,7 @@ No match 0: HIJ /^(ab|cd)e/i +\= Expect no match ABCDE No match @@ -4937,8 +4783,7 @@ No match REFFGZ 0: EFFGZ 1: EFFGZ - *** Failers -No match +\= Expect no match ADCDCDE No match EFFG @@ -4998,8 +4843,7 @@ No match 1: C /multiple words of text/i - *** Failers -No match +\= Expect no match AA No match UH-UH @@ -5157,8 +5001,7 @@ No match aaaaaaaaaa 0: aaaaaaaaaa 1: aaaa - *** Failers -No match +\= Expect no match AB No match aaaaaaaaa @@ -5170,8 +5013,7 @@ No match aaaaaaaaaa 0: aaaaaaaaaa 1: aaaa - *** Failers -No match +\= Expect no match aaaaaaaaa No match aaaaaaaaaaa @@ -5190,8 +5032,7 @@ No match /(?<=a)b/ ab 0: b - *** Failers -No match +\= Expect no match cb No match b @@ -5267,8 +5108,7 @@ No match 1: A /(?:(?i)a)b/ - *** Failers -No match +\= Expect no match cb No match aB @@ -5295,8 +5135,7 @@ No match 1: A /(?i:a)b/ - *** Failers -No match +\= Expect no match aB No match aB @@ -5323,34 +5162,14 @@ No match 1: a /(?:(?-i)a)b/i - *** Failers -No match aB 0: aB - Ab -No match - -/((?-i)a)b/i - -/(?:(?-i)a)b/i - aB - 0: aB - -/((?-i)a)b/i - aB - 0: aB - 1: a - -/(?:(?-i)a)b/i - *** Failers -No match +\= Expect no match Ab No match AB No match -/((?-i)a)b/i - /(?-i:a)b/i ab 0: ab @@ -5370,8 +5189,7 @@ No match 1: a /(?-i:a)b/i - *** Failers -No match +\= Expect no match AB No match Ab @@ -5389,8 +5207,7 @@ No match 1: a /(?-i:a)b/i - *** Failers -No match +\= Expect no match Ab No match AB @@ -5399,8 +5216,7 @@ No match /((?-i:a))b/i /((?-i:a.))b/i - *** Failers -No match +\= Expect no match AB No match a\nB @@ -5445,8 +5261,7 @@ No match 0: aaac /(? - 2: Failers +\= Expect no match abcd: No match abcd: @@ -5729,8 +5534,7 @@ No match 1: x /a\Z/ - *** Failers -No match +\= Expect no match aaab No match a\nb\n @@ -5749,8 +5553,6 @@ No match /b\z/ a\nb 0: b - *** Failers -No match /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/ a @@ -5780,8 +5582,7 @@ No match 12-ab.1245 0: 12-ab.1245 1: - *** Failers -No match +\= Expect no match \ No match .a @@ -5816,18 +5617,19 @@ No match endingwxyz 0: endingwxyz 1: wxyz - *** Failers -No match +\= Expect no match a rather long string that doesn't end with one of them No match /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/ word cat dog elephant mussel cow horse canary baboon snake shark otherword 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark No match /word (?>[a-zA-Z0-9]+ ){0,30}otherword/ +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope No match @@ -5836,8 +5638,7 @@ No match 0: foo 123999foo 0: foo - *** Failers -No match +\= Expect no match 123abcfoo No match @@ -5846,8 +5647,7 @@ No match 0: foo 123999foo 0: foo - *** Failers -No match +\= Expect no match 123abcfoo No match @@ -5856,8 +5656,7 @@ No match 0: foo 123456foo 0: foo - *** Failers -No match +\= Expect no match 123999foo No match @@ -5866,8 +5665,7 @@ No match 0: foo 123456foo 0: foo - *** Failers -No match +\= Expect no match 123999foo No match @@ -5973,8 +5771,7 @@ No match 0: - 0digit 0: 0 - *** Failers -No match +\= Expect no match bcdef No match @@ -5999,11 +5796,12 @@ No match 0: ab /(?!\A)x/m - a\nxb\n + a\nxb\n 0: x /(?!^)x/m - a\nxb\n +\= Expect no match + a\nxb\n No match /abc\Qabc\Eabc/ @@ -6017,8 +5815,7 @@ No match / abc\Q abc\Eabc/x abc abcabc 0: abc abcabc - *** Failers -No match +\= Expect no match abcabcabc No match @@ -6058,8 +5855,7 @@ No match /\Gabc/ abc 0: abc - *** Failers -No match +\= Expect no match xyzabc No match @@ -6077,8 +5873,7 @@ No match /a(?x: b c )d/ XabcdY 0: abcd - *** Failers -No match +\= Expect no match Xa b c d Y No match @@ -6093,8 +5888,7 @@ No match /(?i)AB(?-i)C/ XabCY 0: abC - *** Failers -No match +\= Expect no match XabcY No match @@ -6105,8 +5899,7 @@ No match DE 0: DE 1: D - *** Failers -No match +\= Expect no match abcE No match abCe @@ -6173,8 +5966,7 @@ No match a123:ddde:9999:b342::324e:dcba:abcd 0: a123:ddde:9999:b342::324e:dcba:abcd 1: - *** Failers -No match +\= Expect no match 1:2:3:4:5:6:7:8 No match a123:bce:ddde:9999:b342::324e:dcba:abcd @@ -6203,12 +5995,12 @@ No match 0: d ] 0: ] - *** Failers - 0: a +\= Expect no match b No match /(a+)*b/ +\= Expect no match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -6243,8 +6035,7 @@ No match /ab cd(?x) de fg/ ab cddefg 0: ab cddefg - ** Failers -No match +\= Expect no match abcddefg No match @@ -6252,24 +6043,21 @@ No match foobarX 0: bar 1: bar - ** Failers -No match +\= Expect no match boobarX No match /(?a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No match /(?:a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No match /\Z/g abc\n @@ -6521,18 +6306,21 @@ No match /^(?s)(?>.*)(?a+|ab)+?c/ +\= Expect no match aabc No match /(?>a+|ab)+c/ +\= Expect no match aabc No match @@ -6811,10 +6602,12 @@ No match 2: b /^(?:a|ab)++c/ +\= Expect no match aaaabc No match /^(?>a|ab)++c/ +\= Expect no match aaaabc No match @@ -6826,8 +6619,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -6835,8 +6627,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -6844,8 +6635,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -6854,8 +6644,7 @@ No match 0: xyz /(?=abc){1}xyz/ - ** Failers -No match +\= Expect no match xyz No match @@ -6894,8 +6683,7 @@ No match /^[\g]+/ ggg<<>> 0: ggg<<>> - ** Failers -No match +\= Expect no match \\ga No match @@ -6918,16 +6706,14 @@ No match /(?<=a{2})b/i xaabc 0: b - ** Failers -No match +\= Expect no match xabc No match /(? X NYQZ 0: X NYQZ - ** Failers -No match +\= Expect no match >XYZ No match > X NY Z @@ -7093,8 +6871,7 @@ No match abcdef 0: 0+ def - ** Failers -No match +\= Expect no match defabcxyz No match @@ -7113,6 +6890,7 @@ No match 1: bon /(^(a|b\g{-1}))/ +\= Expect no match bacxxx No match @@ -7123,8 +6901,7 @@ No match xyzxyz 0: xyzxyz 1: xyz - ** Failers -No match +\= Expect no match abcxyz No match xyzabc @@ -7137,8 +6914,7 @@ No match xyzabc 0: xyzabc 1: xyz - ** Failers -No match +\= Expect no match xyzxyz No match @@ -7180,8 +6956,7 @@ No match ab:ababxyz 0: ab:abab 1: ab - ** Failers -No match +\= Expect no match a:axyz No match ab:abxyz @@ -7194,8 +6969,7 @@ No match ab:ababxyz 0: ab:abab 1: ab - ** Failers -No match +\= Expect no match a:axyz No match ab:abxyz @@ -7245,8 +7019,7 @@ No match 0: 10.0.0.0 1: 2: .0 - ** Failers -No match +\= Expect no match 10.6 No match 455.3.4.5 @@ -7262,8 +7035,7 @@ No match 10.0.0.0 0: 10.0.0.0 1: .0 - ** Failers -No match +\= Expect no match 10.6 No match 455.3.4.5 @@ -7273,8 +7045,7 @@ No match now is the time for all good men to come to the aid of the party 0: now is the time for all good men to come to the aid of the party 1: party - *** Failers -No match +\= Expect no match this is not a line with only words and spaces! No match @@ -7283,8 +7054,7 @@ No match 0: 12345a 1: 12345 2: a - *** Failers -No match +\= Expect no match 12345+ No match @@ -7314,8 +7084,7 @@ No match (abc(def)xyz) 0: (abc(def)xyz) 1: xyz - *** Failers -No match +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -7329,8 +7098,7 @@ No match a(b(c))d 0: a(b(c))d 1: d - *** Failers) -No match +\= Expect no match) a(b(c)d No match @@ -7368,8 +7136,7 @@ No match 2: 3: AblewasIereIsawElba 4: A - *** Failers -No match +\= Expect no match Thequickbrownfox No match @@ -7384,8 +7151,7 @@ No match -12 0: -12 1: -12 - *** Failers -No match +\= Expect no match ((2+2)*-3)-7) No match @@ -7398,8 +7164,7 @@ No match 0: xxyzxyzz 1: xxyzxyzz 2: xyzxyz - *** Failers -No match +\= Expect no match xxyzz No match xxyzxyzxyzz @@ -7430,28 +7195,32 @@ No match 0: <> 1: <> 2: <> - *** Failers -No match +\= Expect no match 3: Able was I ere I saw Elba 4: A - *** Failers -No match +\= Expect no match The quick brown fox No match @@ -7574,6 +7342,7 @@ No match 0: ablewasiereisawelba 1: ablewasiereisawelba 2: a +\= Expect no match rhubarb No match the quick brown fox @@ -7583,8 +7352,7 @@ No match baz 0: a 1: a - ** Failers -No match +\= Expect no match caz No match @@ -7592,8 +7360,7 @@ No match zbaaz 0: a 1: a - ** Failers -No match +\= Expect no match aaa No match @@ -7609,8 +7376,7 @@ No match defdef 0: defdef 1: def - ** Failers -No match +\= Expect no match abcdef No match defabc @@ -7623,8 +7389,7 @@ No match defabc 0: defabc 1: def - ** Failers -No match +\= Expect no match defdef No match abcdef @@ -7644,8 +7409,7 @@ No match 4: " 5: 6: " - ** Failers -No match +\= Expect no match b\"11111 No match @@ -7656,8 +7420,7 @@ No match CCD 0: CC 1: C - ** Failers -No match +\= Expect no match CAD No match @@ -7668,8 +7431,7 @@ No match BCD 0: BC 1: C - ** Failers -No match +\= Expect no match ABCD No match CAD @@ -7693,8 +7455,7 @@ No match BAX 0: BA 1: A - ** Failers -No match +\= Expect no match ACX No match ABC @@ -7715,16 +7476,14 @@ No match 2: ef /^(?=a(*SKIP)b|ac)/ - ** Failers -No match +\= Expect no match ac No match /^(?=a(*PRUNE)b)/ ab 0: - ** Failers -No match +\= Expect no match ac No match @@ -7798,14 +7557,14 @@ No match # I think is a Perl bug. /A(*COMMIT)(B|D)/ +\= Expect no match ACABX No match # Check the use of names for failure /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/mark - ** Failers -No match +\= Expect no match AC No match, mark = A CB @@ -7816,20 +7575,22 @@ No match, mark = B 0: C 1: C MK: A +\= Expect no match D No match, mark = A /^(A(*THEN:A)B|C(*THEN:B)D)/mark - ** Failers -No match +\= Expect no match CB No match, mark = B /^(?:A(*THEN:A)B|C(*THEN:B)D)/mark +\= Expect no match CB No match, mark = B /^(?>A(*THEN:A)B|C(*THEN:B)D)/mark +\= Expect no match CB No match, mark = B @@ -7855,6 +7616,7 @@ No match, mark = B 0: AC /(*:A)A+(*SKIP:A)(B|Z)/mark +\= Expect no match AAAC No match, mark = A @@ -7878,8 +7640,7 @@ MK: B 1: A 2: B 3: C - ** Failers -No match +\= Expect no match DEFGABC No match @@ -7891,6 +7652,7 @@ No match 1: a /(\w+)b(*COMMIT)\w{2}/ +\= Expect no match abbb No match @@ -7903,10 +7665,12 @@ No match # COMMIT should override THEN. /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/ +\= Expect no match yes No match /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/ +\= Expect no match yes No match @@ -7917,10 +7681,12 @@ No match 0: bc /(*SKIP)bc/ +\= Expect no match a No match /(*SKIP)b/ +\= Expect no match a No match @@ -7936,9 +7702,7 @@ No match aA 0: aA 1: a - ** Failers - 0: ** - 1: * +\= Expect no match ab No match aB @@ -7951,8 +7715,7 @@ No match /^(?&t)*+(?(DEFINE)(?a))\w$/ aaaaaaX 0: aaaaaaX - ** Failers -No match +\= Expect no match aaaaaa No match @@ -7971,8 +7734,7 @@ No match 0: Y 1: 2: Y - ** Failers -No match +\= Expect no match aaaa No match @@ -7983,8 +7745,7 @@ No match YZ 0: Y 1: Y - ** Failers -No match +\= Expect no match aaaa No match @@ -7993,8 +7754,7 @@ No match 0: aaaaX 1: a 2: X - ** Failers -No match +\= Expect no match aaaa No match YZ @@ -8004,8 +7764,7 @@ No match aaaaX 0: aaaaX 1: X - ** Failers -No match +\= Expect no match aaaa No match YZ @@ -8034,8 +7793,7 @@ No match 0: aaaaX 1: a 2: X - ** Failers -No match +\= Expect no match aaa No match YZ @@ -8045,8 +7803,7 @@ No match aaaaX 0: aaaaX 1: X - ** Failers -No match +\= Expect no match aaa No match YZ @@ -8064,16 +7821,14 @@ No match 1: /(a)++(?1)b/ - ** Failers -No match +\= Expect no match ab No match aab No match /(a)*+(?1)b/ - ** Failers -No match +\= Expect no match ab No match aab @@ -8130,6 +7885,7 @@ No match 1: a /^(a)(?1)++ab/ +\= Expect no match aaaab No match @@ -8202,6 +7958,7 @@ MK: any \x0aname # Capture /^.*? (a(*THEN)b) c/x +\= Expect no match aabc No match @@ -8217,12 +7974,14 @@ No match 2: ab /^.*? ( (a(*THEN)b) ) c/x +\= Expect no match aabc No match # Non-capture /^.*? (?:a(*THEN)b) c/x +\= Expect no match aabc No match @@ -8235,12 +7994,14 @@ No match 0: aabc /^.*? (?: (?:a(*THEN)b) ) c/x +\= Expect no match aabc No match # Atomic /^.*? (?>a(*THEN)b) c/x +\= Expect no match aabc No match @@ -8253,12 +8014,14 @@ No match 0: aabc /^.*? (?> (?>a(*THEN)b) ) c/x +\= Expect no match aabc No match # Possessive capture /^.*? (a(*THEN)b)++ c/x +\= Expect no match aabc No match @@ -8274,12 +8037,14 @@ No match 2: ab /^.*? ( (a(*THEN)b)++ )++ c/x +\= Expect no match aabc No match # Possessive non-capture /^.*? (?:a(*THEN)b)++ c/x +\= Expect no match aabc No match @@ -8292,6 +8057,7 @@ No match 0: aabc /^.*? (?: (?:a(*THEN)b)++ )++ c/x +\= Expect no match aabc No match @@ -8304,6 +8070,7 @@ No match # Condition /^.*?(?(?=a)a|b(*THEN)c)/ +\= Expect no match ba No match @@ -8312,6 +8079,7 @@ No match 0: ba /^.*?(?(?=a)a(*THEN)b|c)/ +\= Expect no match ac No match @@ -8347,8 +8115,7 @@ MK: m xabcd 0: c 1: ab - ** Failers -No match +\= Expect no match xacd No match @@ -8386,6 +8153,7 @@ MK: N 0: C 1: C MK: B +\= Expect no match D No match, mark = B @@ -8394,6 +8162,7 @@ No match, mark = B 0: C 1: C MK: B +\= Expect no match D No match, mark = B @@ -8402,6 +8171,7 @@ No match, mark = B 0: C 1: C MK: B +\= Expect no match D No match, mark = B @@ -8410,6 +8180,7 @@ No match, mark = B 0: C 1: C MK: B +\= Expect no match D No match, mark = B @@ -8418,28 +8189,33 @@ No match, mark = B 0: C 1: C MK: B +\= Expect no match D No match, mark = B # This should fail, as the skip causes a bump to offset 3 (the skip). /A(*MARK:A)A+(*SKIP)(B|Z) | AC/x,mark +\= Expect no match AAAC No match, mark = A # Same /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/x,mark +\= Expect no match AAAC No match, mark = B /A(*:A)A+(*SKIP)(B|Z) | AC/x,mark +\= Expect no match AAAC No match, mark = A # This should fail, as a null name is the same as no name. /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/x,mark +\= Expect no match AAAC No match, mark = A @@ -8455,8 +8231,7 @@ MK: A XXYZ 0: XXY MK: B - ** Failers -No match +\= Expect no match XAQQ No match, mark = A XAQQXZZ @@ -8475,8 +8250,7 @@ MK: A 0: CD 1: CD MK: B - ** Failers -No match +\= Expect no match AC No match, mark = A CB @@ -8491,8 +8265,7 @@ MK: A 0: CD 1: CD MK: B - ** Failers -No match +\= Expect no match AC No match, mark = A CB @@ -8531,16 +8304,14 @@ MK: A aw 0: aw MK: n - ** Failers -No match, mark = n +\= Expect no match abc No match, mark = m /b(*:m)f|aw/mark abaw 0: aw - ** Failers -No match +\= Expect no match abc No match, mark = m abax @@ -8551,14 +8322,12 @@ No match, mark = m 0: AAC /a(*PRUNE:X)bc|qq/mark,no_start_optimize - ** Failers -No match, mark = X +\= Expect no match axy No match, mark = X /a(*THEN:X)bc|qq/mark,no_start_optimize - ** Failers -No match, mark = X +\= Expect no match axy No match, mark = X @@ -8566,8 +8335,7 @@ No match, mark = X abxy 0: abx MK: A - ** Failers -No match +\= Expect no match abpq No match @@ -8575,8 +8343,7 @@ No match abxy 0: abx MK: Y - ** Failers -No match +\= Expect no match abpq No match @@ -8584,8 +8351,7 @@ No match abxy 0: abx MK: A - ** Failers -No match +\= Expect no match abpq No match @@ -8593,8 +8359,7 @@ No match abxy 0: abx MK: Y - ** Failers -No match +\= Expect no match abpq No match @@ -8602,8 +8367,7 @@ No match abxy 0: abx MK: A - ** Failers -No match +\= Expect no match abpq No match @@ -8611,8 +8375,7 @@ No match abxy 0: abx MK: Y - ** Failers -No match +\= Expect no match abpq No match @@ -8623,6 +8386,7 @@ No match 2: /(another)?(\1+)test/ +\= Expect no match hello world test No match @@ -8657,6 +8421,7 @@ No match 0: ab /(?>^a)b/s +\= Expect no match aab No match @@ -8679,6 +8444,7 @@ No match 2: wxyz "(?>.*)foo" +\= Expect no match abcdfooxyz No match @@ -8695,6 +8461,7 @@ No match 0: ac /(?<=(*SKIP)ac)a/ +\= Expect no match aa No match @@ -8784,6 +8551,7 @@ MK: n # This gives "no match", as expected. /aaaaa(*COMMIT)b|a+c/ +\= Expect no match aaaaaac No match @@ -8860,6 +8628,7 @@ No match abc 0: abc 1: ab +\= Expect no match abd No match @@ -8876,10 +8645,11 @@ No match 0: abd /a(?=b(*COMMIT)c)[^d]|abd/ + abc + 0: ab +\= Expect no match abd No match - abc - 0: ab /a(?=bc).|abd/ abd @@ -8888,6 +8658,7 @@ No match 0: ab /a(?>b(*COMMIT)c)d|abd/ +\= Expect no match abceabd No match @@ -8900,6 +8671,7 @@ No match 0: abd /(?>a(*COMMIT)c)d|abd/ +\= Expect no match abd No match @@ -8913,8 +8685,7 @@ No match # made them compatible. /^(a)?(?(1)a|b)+$/ - *** Failers -No match +\= Expect no match a No match @@ -8934,8 +8705,8 @@ No match abcd 0: abcd - /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/x,mark +\= Expect no match AAAC No match, mark = A @@ -8943,68 +8714,82 @@ No match, mark = A abcd 0: abcd 1: abcd - *** Failers -No match +\= Expect no match abcxy No match /^((yes|no)(*THEN)(*F))?/ +\= Expect no match yes No match /(A (.*) C? (*THEN) | A D) (*FAIL)/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) C? (*THEN) | A D) z/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) C? (*THEN) | A D) \s* z/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) (?:C|) (*THEN) | A D) z/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) C{0,6} (*THEN) | A D) z/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x +\= Expect no match AbcdCEBefgBhiBqz No match /(A (.*) (CE){0,6} (*THEN) | A D) z/x +\= Expect no match AbcdCEBefgBhiBqz No match /(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x +\= Expect no match AbcdCBefgBhiBqz No match /(A (.*) (CE*){0,6} (*THEN) | A D) z/x +\= Expect no match AbcdCBefgBhiBqz No match /(?=a(*COMMIT)b|ac)ac|ac/ +\= Expect no match ac No match /(?=a(*COMMIT)b|(ac)) ac | (a)c/x +\= Expect no match ac No match @@ -9039,6 +8824,7 @@ No match 0: bn /(?=b(*SKIP)a)bn|bnn/ +\= Expect no match bnn No match @@ -9105,30 +8891,35 @@ MK: m(m /^\d*\w{4}/ 1234 0: 1234 +\= Expect no match 123 No match /^[^b]*\w{4}/ aaaa 0: aaaa +\= Expect no match aaa No match /^[^b]*\w{4}/i aaaa 0: aaaa +\= Expect no match aaa No match /^a*\w{4}/ aaaa 0: aaaa +\= Expect no match aaa No match /^a*\w{4}/i aaaa 0: aaaa +\= Expect no match aaa No match @@ -9151,8 +8942,7 @@ No match 1: A 2: 3: bar - ** Failers -No match +\= Expect no match Afoofoo No match Abarbar @@ -9235,6 +9025,7 @@ No match 1: ab /(?:x|(?:(xx|yy)+|x|x|x|x|x)|a|a|a)bc/ +\= Expect no match acb No match @@ -9294,6 +9085,7 @@ No match 2: b /(?:(?P=same)?(?:(?P=same)(?Pa)(?P=same)|(?P=same)?(?Pb)(?P=same)){2}(?P=same)(?Pc)(?P=same)){2}(?Pz)?/g,dupnames +\= Expect no match bbbaaaccccaaabbbcc No match @@ -9435,8 +9227,7 @@ No match baaa 0: baaa 1: b - ** Failers -No match +\= Expect no match bb No match diff --git a/testdata/testoutput10 b/testdata/testoutput10 index 89b4d36..291cc4e 100644 --- a/testdata/testoutput10 +++ b/testdata/testoutput10 @@ -58,11 +58,12 @@ /a\C\Cb/utf a\x{100}b 0: a\x{100}b - ** Failers -No match +\= Expect no match a\x{12257}b No match +# The next 3 patterns have UTF-8 errors + /[Ã]/utf Failed: error -8 at offset 0: UTF-8 error: byte 2 top bits not 0x80 @@ -72,7 +73,10 @@ Failed: error -3 at offset 0: UTF-8 error: 1 byte missing at end /ÃÃÃxxx/utf Failed: error -8 at offset 0: UTF-8 error: byte 2 top bits not 0x80 +# Now test subjects + /badutf/utf +\= Expect UTF-8 errors X\xdf Failed: error -3: UTF-8 error: 1 byte missing at end at offset 1 XX\xef @@ -153,6 +157,7 @@ Failed: error -23: UTF-8 error: illegal byte (0xfe or 0xff) at offset 0 Failed: error -23: UTF-8 error: illegal byte (0xfe or 0xff) at offset 0 /badutf/utf +\= Expect UTF-8 errors XX\xfb\x80\x80\x80\x80 Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 2 XX\xfd\x80\x80\x80\x80\x80 @@ -161,6 +166,7 @@ Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at of Failed: error -15: UTF-8 error: code points greater than 0x10ffff are not defined at offset 2 /shortutf/utf +\= Expect UTF-8 errors XX\xdf\=ph Failed: error -3: UTF-8 error: 1 byte missing at end at offset 2 XX\xef\=ph @@ -193,6 +199,7 @@ Failed: error -4: UTF-8 error: 2 bytes missing at end at offset 0 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 0 /anything/utf +\= Expect UTF-8 errors X\xc0\x80 Failed: error -17: UTF-8 error: overlong 2-byte sequence at offset 1 XX\xc1\x8f @@ -209,6 +216,15 @@ Failed: error -21: UTF-8 error: overlong 6-byte sequence at offset 0 Failed: error -23: UTF-8 error: illegal byte (0xfe or 0xff) at offset 0 \xff\x80\x80\x80\x80\x80 Failed: error -23: UTF-8 error: illegal byte (0xfe or 0xff) at offset 0 + \xf8\x88\x80\x80\x80 +Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 0 + \xf9\x87\x80\x80\x80 +Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 0 + \xfc\x84\x80\x80\x80\x80 +Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at offset 0 + \xfd\x83\x80\x80\x80\x80 +Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at offset 0 +\= Expect no match \xc3\x8f No match \xe0\xaf\x80 @@ -219,14 +235,6 @@ No match No match \xf1\x8f\x80\x80 No match - \xf8\x88\x80\x80\x80 -Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 0 - \xf9\x87\x80\x80\x80 -Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 0 - \xfc\x84\x80\x80\x80\x80 -Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at offset 0 - \xfd\x83\x80\x80\x80\x80 -Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at offset 0 \xf8\x88\x80\x80\x80\=no_utf_check No match \xf9\x87\x80\x80\x80\=no_utf_check @@ -239,26 +247,31 @@ No match # Similar tests with offsets /badutf/utf +\= Expect UTF-8 errors X\xdfabcd Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=1 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 +\= Expect no match X\xdfabcd\=offset=2 No match /(?<=x)badutf/utf +\= Expect UTF-8 errors X\xdfabcd Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=1 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=2 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 - X\xdfabcd\=offset=3 -No match X\xdfabcd\xdf\=offset=3 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 6 +\= Expect no match + X\xdfabcd\=offset=3 +No match /(?<=xx)badutf/utf +\= Expect UTF-8 errors X\xdfabcd Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=1 @@ -269,6 +282,7 @@ Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 /(?<=xxxx)badutf/utf +\= Expect UTF-8 errors X\xdfabcd Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=1 @@ -277,12 +291,13 @@ Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 X\xdfabcd\=offset=3 Failed: error -8: UTF-8 error: byte 2 top bits not 0x80 at offset 1 - X\xdfabcd\=offset=6 -No match X\xdfabc\xdf\=offset=6 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 5 X\xdfabc\xdf\=offset=7 Failed: error -33: bad offset value +\= Expect no match + X\xdfabcd\=offset=6 +No match /\x{100}/IB,utf ------------------------------------------------------------------ @@ -514,8 +529,7 @@ Subject length lower bound = 1 # correctly, but that messes up comparisons). /a\Cb/utf - *** Failers -No match +\= Expect no match a\x{100}b No match @@ -547,8 +561,7 @@ Subject length lower bound = 1 0: \x{100} \x{1000} 0: \x{1000} - *** Failers - 0: * +\= Expect no match \x{c0} No match \x{f0} @@ -707,8 +720,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[\xff]/IB,utf ------------------------------------------------------------------ @@ -798,33 +809,35 @@ Failed: error 106 at offset 15: missing terminating ] for character class # This tests the stricter UTF-8 check according to RFC 3629. /X/utf +\= Expect UTF-8 errors \x{d800} Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 0 - \x{d800}\=no_utf_check -No match \x{da00} Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 0 - \x{da00}\=no_utf_check -No match \x{dfff} Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 0 - \x{dfff}\=no_utf_check -No match \x{110000} Failed: error -15: UTF-8 error: code points greater than 0x10ffff are not defined at offset 0 - \x{110000}\=no_utf_check -No match \x{2000000} Failed: error -13: UTF-8 error: 5-byte character is not allowed (RFC 3629) at offset 0 - \x{2000000}\=no_utf_check -No match \x{7fffffff} Failed: error -14: UTF-8 error: 6-byte character is not allowed (RFC 3629) at offset 0 +\= Expect no match + \x{d800}\=no_utf_check +No match + \x{da00}\=no_utf_check +No match + \x{dfff}\=no_utf_check +No match + \x{110000}\=no_utf_check +No match + \x{2000000}\=no_utf_check +No match \x{7fffffff}\=no_utf_check No match /(*UTF8)\x{1234}/ - abcd\x{1234}pqr + abcd\x{1234}pqr 0: \x{1234} /(*CRLF)(*UTF)(*BSR_UNICODE)a\Rb/I @@ -935,16 +948,19 @@ Subject length lower bound = 3 /a+/utf a\x{123}aa\=offset=1 0: aa - a\x{123}aa\=offset=2 -Error -36 (bad UTF-8 offset) a\x{123}aa\=offset=3 0: aa a\x{123}aa\=offset=4 0: a - a\x{123}aa\=offset=5 -No match +\= Expect bad offset value a\x{123}aa\=offset=6 Failed: error -33: bad offset value +\= Expect bad UTF-8 offset + a\x{123}aa\=offset=2 +Error -36 (bad UTF-8 offset) +\= Expect no match + a\x{123}aa\=offset=5 +No match /\x{1234}+/Ii,utf Capturing subpattern count = 0 @@ -1329,8 +1345,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[z-\x{100}]/IB,utf ------------------------------------------------------------------ @@ -1515,8 +1529,7 @@ Subject length lower bound = 1 0: \x{105} \x{109} 0: \x{109} - ** Failers -No match +\= Expect no match \x{100} No match \x{10a} @@ -1555,8 +1568,7 @@ Subject length lower bound = 1 0: \x{100} \x{101} 0: \x{101} - ** Failers -No match +\= Expect no match \x{102} No match Y @@ -1595,7 +1607,7 @@ Last code unit = 'B' (caseless) Subject length lower bound = 2 /abc/utf,replace=à - abc + abc Failed: error -3: UTF-8 error: 1 byte missing at end # End of testinput10 diff --git a/testdata/testoutput12-16 b/testdata/testoutput12-16 index 2676866..2577d75 100644 --- a/testdata/testoutput12-16 +++ b/testdata/testoutput12-16 @@ -56,8 +56,7 @@ 0: X\x{11234}Y X\x{11234}\x{512}YZ 0: X\x{11234}\x{512} - *** Failers -No match +\= Expect no match X\x{11234} No match @@ -70,9 +69,8 @@ No match /a\C\Cb/utf a\x{12257}b 0: a\x{12257}b +\= Expect no match a\x{12257}\x{11234}b -No match - ** Failers No match a\x{100}b No match @@ -310,9 +308,8 @@ First code unit = \x{d844} Last code unit = \x{deab} Subject length lower bound = 1 -# This one is here not because it's different to Perl, but because the way -# the captured single-byte is displayed. (In Perl it becomes a character, and you -# can't tell the difference.) +# These two \C tests, copied from the UTF-8 input file, do not have any +# problems in 16 or 32 bits. /X(\C)(.*)/utf X\x{1234} @@ -324,12 +321,7 @@ Subject length lower bound = 1 1: \x{0a} 2: abc -# This one is here because Perl gives out a grumbly error message (quite -# correctly, but that messes up comparisons). - /a\Cb/utf - *** Failers -No match a\x{100}b 0: a\x{100}b @@ -362,8 +354,7 @@ Subject length lower bound = 1 0: \x{100} \x{1000} 0: \x{1000} - *** Failers - 0: * +\= Expect no match \x{c0} No match \x{f0} @@ -520,8 +511,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[\xff]/IB,utf ------------------------------------------------------------------ @@ -607,32 +596,34 @@ Subject length lower bound = 2 Failed: error 106 at offset 13: missing terminating ] for character class /X/utf - XX\x{d800} -Failed: error -24: UTF-16 error: missing low surrogate at end at offset 2 - XX\x{d800}\=offset=3 -No match XX\x{d800}\=no_utf_check 0: X - XX\x{da00} -Failed: error -24: UTF-16 error: missing low surrogate at end at offset 2 XX\x{da00}\=no_utf_check 0: X - XX\x{dc00} -Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{dc00}\=no_utf_check 0: X - XX\x{de00} -Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{de00}\=no_utf_check 0: X - XX\x{dfff} -Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{dfff}\=no_utf_check 0: X +\= Expect UTF error + XX\x{d800} +Failed: error -24: UTF-16 error: missing low surrogate at end at offset 2 + XX\x{da00} +Failed: error -24: UTF-16 error: missing low surrogate at end at offset 2 + XX\x{dc00} +Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 + XX\x{de00} +Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 + XX\x{dfff} +Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{110000} ** Failed: character \x{110000} is greater than 0x10ffff and so cannot be converted to UTF-16 XX\x{d800}\x{1234} Failed: error -25: UTF-16 error: invalid low surrogate at offset 3 +\= Expect no match + XX\x{d800}\=offset=3 +No match /(?<=.)X/utf XX\x{d800}\=offset=3 @@ -794,8 +785,10 @@ Subject length lower bound = 3 0: aa a\x{123}aa\=offset=3 0: a +\= Expect no match a\x{123}aa\=offset=4 No match +\= Expect bad offset error a\x{123}aa\=offset=5 Failed: error -33: bad offset value a\x{123}aa\=offset=6 @@ -860,16 +853,21 @@ Subject length lower bound = 1 # Check bad offset /a/utf +\= Expect bad UTF-16 offset, or no match in 32-bit \x{10000}\=offset=1 Error -36 (bad UTF-16 offset) \x{10000}ab\=offset=1 Error -36 (bad UTF-16 offset) +\= Expect 16-bit match, 32-bit no match \x{10000}ab\=offset=2 0: a +\= Expect no match \x{10000}ab\=offset=3 No match +\= Expect no match in 16-bit, bad offset in 32-bit \x{10000}ab\=offset=4 No match +\= Expect bad offset \x{10000}ab\=offset=5 Failed: error -33: bad offset value @@ -1180,8 +1178,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[z-\x{100}]/IB,utf ------------------------------------------------------------------ @@ -1371,8 +1367,7 @@ Subject length lower bound = 1 0: \x{105} \x{109} 0: \x{109} - ** Failers -No match +\= Expect no match \x{100} No match \x{10a} @@ -1416,8 +1411,7 @@ Subject length lower bound = 1 0: \x{100} \x{101} 0: \x{101} - ** Failers -No match +\= Expect no match \x{102} No match Y diff --git a/testdata/testoutput12-32 b/testdata/testoutput12-32 index a805b88..6919f09 100644 --- a/testdata/testoutput12-32 +++ b/testdata/testoutput12-32 @@ -54,8 +54,7 @@ No match 0: X\x{11234}YZ X\x{11234}\x{512}YZ 0: X\x{11234}\x{512}Y - *** Failers -No match +\= Expect no match X\x{11234} No match @@ -68,10 +67,9 @@ No match /a\C\Cb/utf a\x{12257}b No match +\= Expect no match a\x{12257}\x{11234}b 0: a\x{12257}\x{11234}b - ** Failers -No match a\x{100}b No match @@ -303,9 +301,8 @@ Options: utf First code unit = \x{212ab} Subject length lower bound = 1 -# This one is here not because it's different to Perl, but because the way -# the captured single-byte is displayed. (In Perl it becomes a character, and you -# can't tell the difference.) +# These two \C tests, copied from the UTF-8 input file, do not have any +# problems in 16 or 32 bits. /X(\C)(.*)/utf X\x{1234} @@ -317,12 +314,7 @@ Subject length lower bound = 1 1: \x{0a} 2: abc -# This one is here because Perl gives out a grumbly error message (quite -# correctly, but that messes up comparisons). - /a\Cb/utf - *** Failers -No match a\x{100}b 0: a\x{100}b @@ -355,8 +347,7 @@ Subject length lower bound = 1 0: \x{100} \x{1000} 0: \x{1000} - *** Failers - 0: * +\= Expect no match \x{c0} No match \x{f0} @@ -513,8 +504,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[\xff]/IB,utf ------------------------------------------------------------------ @@ -600,32 +589,34 @@ Subject length lower bound = 2 Failed: error 106 at offset 13: missing terminating ] for character class /X/utf - XX\x{d800} -Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 - XX\x{d800}\=offset=3 -No match XX\x{d800}\=no_utf_check 0: X - XX\x{da00} -Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 XX\x{da00}\=no_utf_check 0: X - XX\x{dc00} -Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 XX\x{dc00}\=no_utf_check 0: X - XX\x{de00} -Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 XX\x{de00}\=no_utf_check 0: X - XX\x{dfff} -Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 XX\x{dfff}\=no_utf_check 0: X +\= Expect UTF error + XX\x{d800} +Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 + XX\x{da00} +Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 + XX\x{dc00} +Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 + XX\x{de00} +Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 + XX\x{dfff} +Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 XX\x{110000} Failed: error -28: UTF-32 error: code points greater than 0x10ffff are not defined at offset 2 XX\x{d800}\x{1234} Failed: error -27: UTF-32 error: code points 0xd800-0xdfff are not defined at offset 2 +\= Expect no match + XX\x{d800}\=offset=3 +No match /(?<=.)X/utf XX\x{d800}\=offset=3 @@ -786,8 +777,10 @@ Subject length lower bound = 3 0: aa a\x{123}aa\=offset=3 0: a +\= Expect no match a\x{123}aa\=offset=4 No match +\= Expect bad offset error a\x{123}aa\=offset=5 Failed: error -33: bad offset value a\x{123}aa\=offset=6 @@ -852,16 +845,21 @@ Subject length lower bound = 1 # Check bad offset /a/utf +\= Expect bad UTF-16 offset, or no match in 32-bit \x{10000}\=offset=1 No match \x{10000}ab\=offset=1 0: a +\= Expect 16-bit match, 32-bit no match \x{10000}ab\=offset=2 No match +\= Expect no match \x{10000}ab\=offset=3 No match +\= Expect no match in 16-bit, bad offset in 32-bit \x{10000}ab\=offset=4 Failed: error -33: bad offset value +\= Expect bad offset \x{10000}ab\=offset=5 Failed: error -33: bad offset value @@ -1172,8 +1170,6 @@ Subject length lower bound = 1 0: \x{100} \x{100}Z 0: \x{100} - *** Failers -No match /[z-\x{100}]/IB,utf ------------------------------------------------------------------ @@ -1363,8 +1359,7 @@ Subject length lower bound = 1 0: \x{105} \x{109} 0: \x{109} - ** Failers -No match +\= Expect no match \x{100} No match \x{10a} @@ -1408,8 +1403,7 @@ Subject length lower bound = 1 0: \x{100} \x{101} 0: \x{101} - ** Failers -No match +\= Expect no match \x{102} No match Y diff --git a/testdata/testoutput17 b/testdata/testoutput17 index 26aeed6..53c55b8 100644 --- a/testdata/testoutput17 +++ b/testdata/testoutput17 @@ -33,6 +33,7 @@ Subject length lower bound = 4 JIT compilation was successful abcd 0: abcd (JIT) +\= Expect no match xyz No match (JIT) @@ -44,6 +45,7 @@ Subject length lower bound = 4 JIT compilation was not successful abcd 0: abcd +\= Expect no match xyz No match @@ -54,6 +56,7 @@ No match Partial match: ab (JIT) ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match (JIT) @@ -64,6 +67,7 @@ No match (JIT) Partial match: ab (JIT) ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match (JIT) @@ -74,6 +78,7 @@ No match (JIT) Partial match: ab ab\=ph Partial match: ab +\= Expect no match xyz No match (JIT) xyz\=ps @@ -86,10 +91,11 @@ No match Failed: error -45: bad JIT option ab\=ph Failed: error -45: bad JIT option - xyz -No match (JIT) xyz\=ps Failed: error -45: bad JIT option +\= Expect no match + xyz +No match (JIT) /abcd/jit=2 abcd @@ -98,6 +104,7 @@ Failed: error -45: bad JIT option Partial match: ab (JIT) ab\=ph Partial match: ab +\= Expect no match xyz No match @@ -118,6 +125,7 @@ Failed: error -45: bad JIT option Partial match: ab (JIT) ab\=ph Partial match: ab +\= Expect no match xyz No match (JIT) @@ -128,6 +136,7 @@ No match (JIT) Partial match: ab ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match @@ -138,6 +147,7 @@ No match Partial match: ab ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match (JIT) @@ -148,6 +158,7 @@ No match (JIT) Partial match: ab (JIT) ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match @@ -158,6 +169,7 @@ No match Partial match: ab (JIT) ab\=ph Partial match: ab (JIT) +\= Expect no match xyz No match (JIT) @@ -169,6 +181,7 @@ Subject length lower bound = 4 JIT compilation was successful /(*NO_START_OPT)a(*:m)b/mark +\= Expect no match a No match, mark = m (JIT) @@ -188,6 +201,7 @@ JIT compilation was successful Minimum match limit = 2 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz (JIT) 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +\= Expect no match aaaaaaaaaaaaaz\=find_limits Minimum match limit = 16383 No match (JIT) @@ -272,8 +286,10 @@ Minimum match limit = 5 3: ee /(a+)*zz/ +\= Expect no match aaaaaaaaaaaaaz No match (JIT) +\= Expect limit exceeded aaaaaaaaaaaaaz\=match_limit=3000 Failed: error -47: match limit exceeded @@ -306,8 +322,10 @@ Starting code units: a z Last code unit = 'z' Subject length lower bound = 2 JIT compilation was successful +\= Expect no match aaaaaaaaaaaaaz No match (JIT) +\= Expect limit exceeded aaaaaaaaaaaaaz\=match_limit=3000 Failed: error -47: match limit exceeded @@ -332,6 +350,7 @@ Failed: error -46: JIT stack limit reached /abcd/ abcd\=anchored 0: abcd +\= Expect no match fail abcd\=anchored No match diff --git a/testdata/testoutput18 b/testdata/testoutput18 index 868e211..b5bd1fe 100644 --- a/testdata/testoutput18 +++ b/testdata/testoutput18 @@ -25,8 +25,6 @@ /abc/ abc 0: abc - *** Failers -No match: POSIX code 17: match failed /^abc|def/ abcdef @@ -47,8 +45,7 @@ No match: POSIX code 17: match failed /the quick brown fox/ the quick brown fox 0: the quick brown fox - *** Failers -No match: POSIX code 17: match failed +\= Expect no match The Quick Brown Fox No match: POSIX code 17: match failed @@ -59,8 +56,7 @@ No match: POSIX code 17: match failed 0: The Quick Brown Fox /(*LF)abc.def/ - *** Failers -No match: POSIX code 17: match failed +\= Expect no match abc\ndef No match: POSIX code 17: match failed @@ -74,6 +70,7 @@ No match: POSIX code 17: match failed Failed: POSIX code 15: bad back reference at offset 6 /(abc\1)/ +\= Expect no match abc No match: POSIX code 17: match failed @@ -96,8 +93,7 @@ Matched without capture 0: ab-cd ab=cd 0: ab=cd - ** Failers -No match: POSIX code 17: match failed +\= Expect no match ab\ncd No match: POSIX code 17: match failed @@ -120,8 +116,7 @@ Matched with REG_NOSUB /a?|b?/ abc 0: a - ** Failers - 0: +\= Expect no match ddd\=notempty No match: POSIX code 17: match failed diff --git a/testdata/testoutput19 b/testdata/testoutput19 index e2bdf32..c4169ca 100644 --- a/testdata/testoutput19 +++ b/testdata/testoutput19 @@ -10,6 +10,7 @@ 0: a\x{1234}b /\w/ +\= Expect no match +++\x{c2} No match: POSIX code 17: match failed diff --git a/testdata/testoutput2 b/testdata/testoutput2 index a91028e..6abd7c4 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -62,8 +62,7 @@ Subject length lower bound = 3 0: abc abc\=anchored 0: abc - *** Failers -No match +\= Expect no match defabc\=anchored No match ABC @@ -78,8 +77,7 @@ Subject length lower bound = 3 0: abc abc\=anchored 0: abc - *** Failers -No match +\= Expect no match defabc No match defabc\=anchored @@ -115,8 +113,7 @@ Overall options: anchored Subject length lower bound = 3 abc 0: abc - *** Failers -No match +\= Expect no match def\nabc No match @@ -320,8 +317,7 @@ Last code unit = 'c' Subject length lower bound = 3 abc 0: abc - *** Failers -No match +\= Expect no match abc\n No match abc\ndef @@ -346,8 +342,7 @@ Options: anchored Subject length lower bound = 19 the quick brown fox 0: the quick brown fox - *** Failers -No match +\= Expect no match this is a line with the quick brown fox No match @@ -475,8 +470,7 @@ Subject length lower bound = 3 0: foo catfoo 0: foo - *** Failers -No match +\= Expect no match the barfoo No match and cattlefoo @@ -616,8 +610,7 @@ Subject length lower bound = 1 0: a a\n 0: a - *** Failers -No match +\= Expect no match a\=noteol No match a\n\=noteol @@ -634,8 +627,7 @@ Subject length lower bound = 1 0: a a\n\=noteol 0: a - *** Failers -No match +\= Expect no match a\=noteol No match @@ -693,8 +685,7 @@ Last code unit = 'r' Subject length lower bound = 3 foo\nbarbar 0: bar - ***Failers -No match +\= Expect no match rhubarb No match barbell @@ -712,8 +703,7 @@ Last code unit = 'r' Subject length lower bound = 3 foo\nbarbar 0: bar - ***Failers -No match +\= Expect no match rhubarb No match barbell @@ -731,8 +721,7 @@ Subject length lower bound = 3 0: abc def\nabc 0: abc - *** Failers -No match +\= Expect no match defabc No match @@ -757,8 +746,7 @@ Subject length lower bound = 5 0: -cart a donkey-cart race 0: -cart - *** Failers -No match +\= Expect no match cart No match horse-and-cart @@ -801,8 +789,7 @@ Subject length lower bound = 2 0: ZZ BZZ 0: ZZ - *** Failers -No match +\= Expect no match ZZ No match abXYZZ @@ -822,16 +809,11 @@ Subject length lower bound = 3 0: bar foobbar 0: bar - *** Failers -No match +\= Expect no match fooabar No match -/This one is here because Perl behaves differently; see also the following/I -Capturing subpattern count = 0 -First code unit = 'T' -Last code unit = 'g' -Subject length lower bound = 73 +# This one is here because Perl behaves differently; see also the following. /^(a\1?){4}$/I Capturing subpattern count = 1 @@ -839,23 +821,21 @@ Max back reference = 1 Compile options: Overall options: anchored Subject length lower bound = 4 +\= Expect no match aaaa No match aaaaaa No match -/Perl does not fail these two for the final subjects. Neither did PCRE until/ -/release 8.01. The problem is in backtracking into a subpattern that contains/ -No match -/a recursive reference to itself. PCRE has now made these into atomic patterns./ -No match +# Perl does not fail these two for the final subjects. Neither did PCRE until +# release 8.01. The problem is in backtracking into a subpattern that contains +# a recursive reference to itself. PCRE has now made these into atomic patterns. /^(xa|=?\1a){2}$/ xa=xaa 0: xa=xaa 1: =xaa - ** Failers -No match +\= Expect no match xa=xaaa No match @@ -863,16 +843,11 @@ No match xa=xaa 0: xa=xaa 1: =xaa - ** Failers -No match +\= Expect no match xa=xaaa No match -/These are syntax tests from Perl 5.005/I -Capturing subpattern count = 0 -First code unit = 'T' -Last code unit = '5' -Subject length lower bound = 38 +# These are syntax tests from Perl 5.005 /a[b-a]/ Failed: error 108 at offset 4: range out of order in character class @@ -1234,8 +1209,7 @@ Subject length lower bound = 3 0+ issippi 0: iss 0+ ippi - *** Failers -No match +\= Expect no match Mississippi\=anchored No match @@ -1585,8 +1559,7 @@ Subject length lower bound = 0 0: ab \ 0: - *** Failers - 0: +\= Expect no match \=notempty No match @@ -1600,8 +1573,7 @@ Subject length lower bound = 0 0: ab-c\=notempty 0: - - *** Failers - 0: +\= Expect no match abc\=notempty No match @@ -1639,8 +1611,7 @@ Subject length lower bound = 2 0: () 12(abcde(fsh)xyz(foo(bar))lmno)89 0: (abcde(fsh)xyz(foo(bar))lmno) - *** Failers -No match +\= Expect no match abcd No match abcd) @@ -1677,8 +1648,7 @@ Subject length lower bound = 3 0: (c) ((ab)) 0: ((ab)) - *** Failers -No match +\= Expect no match () No match @@ -2135,9 +2105,7 @@ Subject length lower bound = 2 aB 0: aB 1: a - *** Failers - 0: ai - 1: a +\= Expect no match Ab No match AB @@ -2660,8 +2628,7 @@ Subject length lower bound = 2 0: ab aB 0: aB - *** Failers -No match +\= Expect no match AB No match @@ -2685,8 +2652,7 @@ Subject length lower bound = 2 aB 0: aB 1: aB - *** Failers -No match +\= Expect no match AB No match @@ -2832,8 +2798,7 @@ Capturing subpattern count = 0 Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z Subject length lower bound = 1 - *** Failers - 0: F +\= Expect no match xxxxx No match @@ -2918,8 +2883,7 @@ Subject length lower bound = 0 now is the time for all good men to come to the aid of the party 0: now is the time for all good men to come to the aid of the party 1: party - *** Failers -No match +\= Expect no match this is not a line with only words and spaces! No match @@ -2931,8 +2895,7 @@ Subject length lower bound = 2 0: 12345a 1: 12345 2: a - *** Failers -No match +\= Expect no match 12345+ No match @@ -2994,8 +2957,7 @@ Subject length lower bound = 3 (abc(def)xyz) 0: (abc(def)xyz) 1: xyz - *** Failers -No match +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -3219,8 +3181,7 @@ Subject length lower bound = 2 0: def> 0: <> - *** Failers -No match +\= Expect no match 1234abcdef 0 ^ ^ d 0: abcdef - *** Failers -No match +\= Expect no match abcxyz No match abcxyzf @@ -3506,8 +3465,7 @@ Subject length lower bound = 7 1 ^ \d 2 ^ ^ d 0: 4abcdef - *** Failers -No match +\= Expect no match abcdef No match @@ -3524,8 +3482,7 @@ Subject length lower bound = 7 1 ^ \d 2 ^ ^ d 0: 4abcdef - *** Failers -No match +\= Expect no match abcdef No match @@ -3549,8 +3506,6 @@ Capturing subpattern count = 0 First code unit = 'a' Last code unit = 'f' Subject length lower bound = 6 - *** Failers -No match \x83\x0\x61bcdef --->\x83\x00abcdef 0 ^ ^ d @@ -3583,8 +3538,7 @@ Callout 1: last capture = 1 123abcdefC-\=callout_none 0: abcdef 1: abc - *** Failers -No match +\= Expect no match 123abcdef\=callout_fail=1 --->123abcdef 0 ^ ^ d @@ -3610,10 +3564,6 @@ Subject length lower bound = 0 1 ^ ^ ) 0: abcabc 1: abc - *** Failers ---->*** Failers - 0 ^ (abc(?C1))* - 0: abcabcabc\=callout_fail=1:3 --->abcabcabc 0 ^ (abc(?C1))* @@ -3755,6 +3705,7 @@ Capturing subpattern count = 2 First code unit = 'a' Last code unit = 'b' Subject length lower bound = 2 +\= Expect no match abbbbbccc\=callout_data=1 --->abbbbbccc 1 ^ ^ @@ -3766,6 +3717,7 @@ Capturing subpattern count = 2 First code unit = 'a' Last code unit = 'b' Subject length lower bound = 2 +\= Expect no match abbbbbccc\=callout_data=1 --->abbbbbccc 1 ^ ^ @@ -3829,8 +3781,7 @@ Subject length lower bound = 3 1: xxab 2: xxab 3: xxab - *** Failers -No match +\= Expect no match xyab No match @@ -3849,8 +3800,7 @@ Subject length lower bound = 0 a(b(c))d 0: a(b(c))d 1: d - *** Failers) -No match +\= Expect no match) a(b(c)d No match @@ -3919,8 +3869,7 @@ Subject length lower bound = 1 -12 0: -12 1: -12 - *** Failers -No match +\= Expect no match ((2+2)*-3)-7) No match @@ -3937,8 +3886,7 @@ Subject length lower bound = 3 0: xxyzxyzz 1: xxyzxyzz 2: xyzxyz - *** Failers -No match +\= Expect no match xxyzz No match xxyzxyzxyzz @@ -3974,8 +3922,7 @@ Subject length lower bound = 2 0: <> 1: <> 2: <> - *** Failers -No match +\= Expect no match 3: Able was I ere I saw Elba 4: A - *** Failers -No match +\= Expect no match The quick brown fox No match @@ -4323,6 +4269,7 @@ Subject length lower bound = 2 Callout data = 1 0: ab 1: ab +\= Expect no match aaabbb\=callout_data=-1 --->aaabbb 1 ^ ^ b @@ -4431,8 +4378,7 @@ Subject length lower bound = 3 1: 10,20,30,5,5,4,4,2,43,23,4234 2: 10 3: ,4234 - *** Failers -No match +\= Expect no match [] No match @@ -4643,6 +4589,7 @@ Subject length lower bound = 5 +4 ^ ^ e +5 ^ ^ 0: abcde +\= Expect no match abcdfe --->abcdfe +0 ^ a @@ -4766,6 +4713,7 @@ Subject length lower bound = 2 +2 ^ ^ b +3 ^ ^ 0: aaaab +\= Expect no match aaaacb --->aaaacb +0 ^ a+ @@ -4833,8 +4781,7 @@ Subject length lower bound = 4 +10 ^ ^ 0: defx 1: def - ** Failers -No match +\= Expect no match abcdefzx --->abcdefzx +0 ^ (abc|def) @@ -4908,8 +4855,7 @@ Subject length lower bound = 4 +10 ^ ^ 0: defx 1: def - ** Failers -No match +\= Expect no match abcdefzx --->abcdefzx +0 ^ (abc|def) @@ -5025,6 +4971,7 @@ Capturing subpattern count = 1 Options: auto_callout Starting code units: a b x Subject length lower bound = 2 +\= Expect no match Note: that { does NOT introduce a quantifier --->Note: that { does NOT introduce a quantifier +0 ^ ([ab]{,4}c|xy) @@ -5074,6 +5021,7 @@ Capturing subpattern count = 1 Options: auto_callout Starting code units: a b x Subject length lower bound = 2 +\= Expect no match Note: that { does NOT introduce a quantifier --->Note: that { does NOT introduce a quantifier +0 ^ ([ab]{,4}c|xy) @@ -5240,8 +5188,7 @@ Partial match: abcd 0: abcde the quick brown abc\=ps Partial match: abc - ** Failers\=ps -No match +\= Expect no match\=ps the quick brown abxyz fox\=ps No match @@ -5282,8 +5229,7 @@ Partial match: 02/ Partial match: 02/0 02/1\=ps Partial match: 02/1 - ** Failers\=ps -No match +\= Expect no match\=ps \=ps No match 123\=ps @@ -5363,8 +5309,7 @@ Partial match: 1234 Partial match: 12345 12345X 0: 12345X - *** Failers -No match +\= Expect no match 1X No match 123456\=ps @@ -5403,8 +5348,7 @@ Last code unit = 'k' Subject length lower bound = 10 this is a line\nbreak 0: line\x0abreak - ** Failers -No match +\= Expect no match line one\nthis is a line\nbreak in the second line No match @@ -5417,8 +5361,7 @@ Last code unit = 'k' Subject length lower bound = 10 this is a line\nbreak 0: line\x0abreak - ** Failers -No match +\= Expect no match line one\nthis is a line\nbreak in the second line No match @@ -5429,8 +5372,7 @@ Last code unit = 'd' Subject length lower bound = 4 AbCd 0: AbCd - ** Failers -No match +\= Expect no match abcd No match @@ -5736,8 +5678,6 @@ Subject length lower bound = 2 2: 3: a2 C a2 (2) A (non-unique) - ** Failers -No match a1b\=copy=Z,copy=A 0: a1 1: a1 @@ -5822,8 +5762,6 @@ Subject length lower bound = 2 2: 3: a2 G a2 (2) A (non-unique) - ** Failers -No match a1b\=get=Z,get=A 0: a1 1: a1 @@ -5903,14 +5841,9 @@ Subject length lower bound = 2 /^(?Pa) (?J:(?Pb)(?Pc)) (?Pd)/I Failed: error 143 at offset 37: two named subpatterns have the same name (PCRE2_DUPNAMES not set) -/ In this next test, J is not set at the outer level; consequently it isn't -set in the pattern's options; consequently pcre_get_named_substring() produces -a random value. /Ix -Capturing subpattern count = 1 -Options: extended -First code unit = 'I' -Last code unit = 'e' -Subject length lower bound = 141 +# In this next test, J is not set at the outer level; consequently it isn't set +# in the pattern's options; consequently pcre2_substring_get_byname() produces +# a random value. /^(?Pa) (?J:(?Pb)(?Pc)) (?Pd)/I Capturing subpattern count = 4 @@ -5946,8 +5879,7 @@ Subject length lower bound = 1 1: a bc 0: b - ** Failers -No match +\= Expect no match abc No match @@ -6046,8 +5978,7 @@ Subject length lower bound = 3 0: abc xyz\r\nabc 0: abc - ** Failers -No match +\= Expect no match xyz\rabc No match xyzabc\r @@ -6068,8 +5999,7 @@ Last code unit = 'c' Subject length lower bound = 3 xyz\r\nabclf> 0: abc - ** Failers -No match +\= Expect no match xyz\nabclf No match xyz\rabclf @@ -6084,8 +6014,7 @@ Last code unit = 'c' Subject length lower bound = 3 xyz\rabc 0: abc - ** Failers -No match +\= Expect no match xyz\nabc No match xyz\r\nabc @@ -6379,8 +6308,7 @@ Last code unit = 'A' Subject length lower bound = 3 aaaA5 0: aaaA5 - ** Failers -No match +\= Expect no match aaaa5 No match @@ -7094,8 +7022,7 @@ Failed: error 141 at offset 3: unrecognized character after (?P bXbX 0: bX 1: X - ** Failers -No match +\= Expect no match aXaX No match aXbX @@ -7141,8 +7068,7 @@ Failed: error 115 at offset 8: reference to non-existent subpattern 0: bx 1: bx 2: x - ** Failers -No match +\= Expect no match axby No match @@ -7162,8 +7088,7 @@ No match 1: Xy 2: X 3: y - ** Failers -No match +\= Expect no match x No match @@ -7311,8 +7236,7 @@ Subject length lower bound = 0 2: 3: Able was I ere I saw Elba 4: A - *** Failers -No match +\= Expect no match The quick brown fox No match @@ -7345,8 +7269,7 @@ Subject length lower bound = 2 0: adaa 1: a 2: d - ** Failers -No match +\= Expect no match addd No match adbb @@ -7361,8 +7284,7 @@ No match 0: bdab 1: b 2: d - ** Failers -No match +\= Expect no match bddd No match @@ -7401,39 +7323,36 @@ Last code unit = 'z' Subject length lower bound = 3 /(a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=0 -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4\=ovector=0 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 1: +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=0 +No match /^a.b/newline=lf a\rb 0: a\x0db - ** Failers -No match +\= Expect no match a\nb No match /^a.b/newline=cr a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match a\rb No match /^a.b/newline=anycrlf a\x85b 0: a\x85b - ** Failers -No match +\= Expect no match a\rb No match /^a.b/newline=any - ** Failers -No match +\= Expect no match a\nb No match a\rb @@ -7474,8 +7393,7 @@ No match 0: a\x0cb a\x85b 0: a\x85b - ** Failers -No match +\= Expect no match a\n\rb No match @@ -7516,8 +7434,7 @@ No match 0: a\x0a\x0db a\n\r\x85\x0cb 0: a\x0a\x0d\x85\x0cb - ** Failers -No match +\= Expect no match ab No match @@ -7536,8 +7453,7 @@ No match 0: a\x0a\x0d\x0a\x0db a\n\n\r\nb 0: a\x0a\x0a\x0d\x0ab - ** Failers -No match +\= Expect no match a\n\n\n\rb No match a\r @@ -7587,17 +7503,19 @@ Subject length lower bound = 3 1: x /(abc)(?i:(?1))/ - defabcabcxyz + defabcabcxyz 0: abcabc 1: abc - DEFabcABCXYZ +\= Expect no match + DEFabcABCXYZ No match /(abc)(?:(?i)(?1))/ - defabcabcxyz + defabcabcxyz 0: abcabc 1: abc - DEFabcABCXYZ +\= Expect no match + DEFabcABCXYZ No match /^(a)\g-2/ @@ -7618,16 +7536,14 @@ Failed: error 115 at offset 9: reference to non-existent subpattern /^a.b/newline=lf a\rb 0: a\x0db - *** Failers -No match +\= Expect no match a\nb No match /.+foo/ afoo 0: afoo - ** Failers -No match +\= Expect no match \r\nfoo No match \nfoo @@ -7638,16 +7554,14 @@ No match 0: afoo \nfoo 0: \x0afoo - ** Failers -No match +\= Expect no match \r\nfoo No match /.+foo/newline=any afoo 0: afoo - ** Failers -No match +\= Expect no match \nfoo No match \r\nfoo @@ -7666,8 +7580,7 @@ No match 0: abc\n\rxyz 0: - ** Failers -No match +\= Expect no match abc\r\nxyz No match @@ -7702,8 +7615,7 @@ No match /^X/m XABC 0: X - ** Failers -No match +\= Expect no match XABC\=notbol No match @@ -7737,8 +7649,7 @@ No match xyabcabc 0: xyabcabc 1: abc - ** Failers -No match +\= Expect no match xyabc No match @@ -7776,8 +7687,7 @@ Failed: error 115 at offset 5: reference to non-existent subpattern 1: abc Y 0: Y - ** Failers -No match +\= Expect no match abcY No match @@ -7807,8 +7717,7 @@ No match 0: YabcXabcXabc 1: Xabc 2: abc - ** Failers -No match +\= Expect no match XabcXabc No match @@ -7858,8 +7767,7 @@ Failed: error 115 at offset 7: reference to non-existent subpattern bon-bon 0: bon-bon 1: bon - ** Failers -No match +\= Expect no match tom-bon No match @@ -7965,8 +7873,7 @@ Failed: error 142 at offset 4: syntax error in subpattern name (missing terminat Ket End ------------------------------------------------------------------ - ** Failers -No match +\= Expect no match XXXX No match @@ -8194,6 +8101,7 @@ Failed: error 106 at offset 10: missing terminating ] for character class ------------------------------------------------------------------ /^a+(*FAIL)/auto_callout +\= Expect no match aaaaaa --->aaaaaa +0 ^ ^ @@ -8207,6 +8115,7 @@ Failed: error 106 at offset 10: missing terminating ] for character class No match /a+b?c+(*FAIL)/auto_callout +\= Expect no match aaabccc --->aaabccc +0 ^ a+ @@ -8230,6 +8139,7 @@ No match No match /a+b?(*PRUNE)c+(*FAIL)/auto_callout +\= Expect no match aaabccc --->aaabccc +0 ^ a+ @@ -8256,6 +8166,7 @@ No match No match /a+b?(*COMMIT)c+(*FAIL)/auto_callout +\= Expect no match aaabccc --->aaabccc +0 ^ a+ @@ -8268,6 +8179,7 @@ No match No match /a+b?(*SKIP)c+(*FAIL)/auto_callout +\= Expect no match aaabcccaaabccc --->aaabcccaaabccc +0 ^ a+ @@ -8287,6 +8199,7 @@ No match No match /a+b?(*THEN)c+(*FAIL)/auto_callout +\= Expect no match aaabccc --->aaabccc +0 ^ a+ @@ -8333,6 +8246,7 @@ Failed: error 161 at offset 11: number is too big Failed: error 115 at offset 3: reference to non-existent subpattern /.+A/newline=crlf +\= Expect no match \r\nA No match @@ -8355,24 +8269,21 @@ Failed: error 160 at offset 5: (*VERB) not recognized or malformed /(*CR)a.b/ a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match a\rb No match /(*CR)a.b/newline=lf a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match a\rb No match /(*LF)a.b/newline=CRLF a\rb 0: a\x0db - ** Failers -No match +\= Expect no match a\nb No match @@ -8381,14 +8292,12 @@ No match 0: a\x0db a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match a\r\nb No match /(*ANYCRLF)a.b/newline=CR - ** Failers -No match +\= Expect no match a\rb No match a\nb @@ -8397,8 +8306,7 @@ No match No match /(*ANY)a.b/newline=cr - ** Failers -No match +\= Expect no match a\rb No match a\nb @@ -8441,8 +8349,7 @@ Subject length lower bound = 3 0: a\x0ab a\r\nb 0: a\x0d\x0ab - ** Failers -No match +\= Expect no match a\x85b No match a\x0bb @@ -8477,8 +8384,7 @@ Subject length lower bound = 2 0: a\x0ab a\r\nb 0: a\x0d\x0ab - ** Failers -No match +\= Expect no match a\x85b No match a\x0bb @@ -8513,8 +8419,7 @@ Subject length lower bound = 4 0: a\x0a\x0d\x0db a\r\n\r\n\r\n\r\nb 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab - ** Failers -No match +\= Expect no match a\x85\x85b No match a\x0b\x0bb @@ -8536,8 +8441,7 @@ Subject length lower bound = 4 0: a\x85\x85b a\x0b\x0bb 0: a\x0b\x0bb - ** Failers -No match +\= Expect no match a\r\r\r\r\rb No match @@ -8675,12 +8579,12 @@ Failed: error 157 at offset 8: \g is not followed by a braced, angle-bracketed, 0: xz yzyy 0: yz - ** Failers -No match +\= Expect no match xxz No match /(\3)(\1)(a)/ +\= Expect no match cat No match @@ -8711,8 +8615,7 @@ Failed: error 115 at offset 3: reference to non-existent subpattern abcbabc 0: abcbabc 1: abc - ** Failers -No match +\= Expect no match abcXabc No match @@ -8720,8 +8623,7 @@ No match abcXabc 0: abcXabc 1: abc - ** Failers -No match +\= Expect no match abcbabc No match @@ -8746,20 +8648,17 @@ Failed: error 106 at offset 4: missing terminating ] for character class Failed: error 106 at offset 5: missing terminating ] for character class /a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match /a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match /a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match @@ -8768,8 +8667,7 @@ No match 0: aXb a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match ab No match @@ -8778,8 +8676,7 @@ No match 0: aXb a\nX\nXb 0: a\x0aX\x0aXb - ** Failers -No match +\= Expect no match ab No match @@ -8878,8 +8775,7 @@ Subject length lower bound = 1 +2 ^ ^ z +3 ^ ^ 0: xyz - ** Failers -No match +\= Expect no match abc No match abcxypqr @@ -8896,20 +8792,7 @@ No match +2 ^ ^ z +3 ^ ^ 0: xyz - ** Failers ---->** Failers - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x -No match +\= Expect no match abc --->abc +0 ^ x @@ -9239,12 +9122,14 @@ Partial match: 123999 ^^^^ /Z(*F)/ +\= Expect no match Z\=ps No match ZA\=ps No match /Z(?!)/ +\= Expect no match Z\=ps No match ZA\=ps @@ -9396,8 +9281,7 @@ Partial match: +ab 0: abc ^^^ 0+ def - ** Failers -No match +\= Expect no match abcdef\=notempty No match xyzabcdef\=notempty @@ -9411,8 +9295,7 @@ No match 0: abc ^^^ 0+ def - ** Failers -No match +\= Expect no match abcdef\=notempty No match @@ -9432,9 +9315,7 @@ No match xyz\=notempty_atstart 0: 0+ yz - ** Failers - 0: - 0+ ** Failers +\= Expect no match xyz\=notempty No match @@ -9445,9 +9326,7 @@ No match xyzabc 0: 0+ xyzabc - ** Failers - 0: - 0+ ** Failers +\= Expect no match xyzabc\=notempty No match xyzabc\=notempty_atstart @@ -9557,8 +9436,7 @@ No match XaaX 0: aa 1: a - ** Failers -No match +\= Expect no match XAAX No match @@ -9769,8 +9647,7 @@ Subject length lower bound = 3 4: " 5: 6: " - ** Failers -No match +\= Expect no match b"11111 No match a"11111 @@ -9824,8 +9701,7 @@ Subject length lower bound = 2 eX 0: eX 1: e - ** Failers -No match +\= Expect no match abcdY No match ey @@ -9870,8 +9746,7 @@ Subject length lower bound = 4 2: b 3: c 4: dd - ** Failers -No match +\= Expect no match abcdde No match @@ -9927,8 +9802,7 @@ Partial match: abcde ABXABD 0: ABD 1: B - ** Failers -No match +\= Expect no match ABX No match BAXBAD @@ -9958,6 +9832,7 @@ Capturing subpattern count = 3 Max back reference = 3 Last code unit = 'a' Subject length lower bound = 3 +\= Expect no match cat No match @@ -9995,8 +9870,7 @@ Subject length lower bound = 1 0: Ab CcC 0: c - ** Failers -No match +\= Expect no match XABX No match @@ -10096,8 +9970,8 @@ No match End ------------------------------------------------------------------ -/ -- This one is here because Perl gives the match as "b" rather than "ab". I - believe this to be a Perl bug. --/ +# This one is here because Perl gives the match as "b" rather than "ab". I +# believe this to be a Perl bug. /(?>a\Kb)z|(ab)/ ab\=startchar @@ -10127,6 +10001,7 @@ Failed: error 159 at offset 13: an argument is not allowed for (*ACCEPT), (*FAIL # bug because replacing the B in the pattern by (B|D) does make it fail. /A(*COMMIT)B/aftertext,mark +\= Expect no match ACABX No match @@ -10138,6 +10013,7 @@ No match 0: AC /A(*PRUNE)B|A(*PRUNE)C/mark +\= Expect no match AC No match @@ -10145,8 +10021,7 @@ No match # though PCRE2 does. /^A(*:A)B|^X(*:A)Y/mark - ** Failers -No match +\= Expect no match XAQQ No match, mark = A @@ -10159,20 +10034,22 @@ No match, mark = A 0: ABC /(*COMMIT)ABC/no_start_optimize - ** Failers -No match +\= Expect no match DEFGABC No match /^(ab (c+(*THEN)cd) | xyz)/x +\= Expect no match abcccd No match /^(ab (c+(*PRUNE)cd) | xyz)/x +\= Expect no match abcccd No match /^(ab (c+(*FAIL)cd) | xyz)/x +\= Expect no match abcccd No match @@ -10209,8 +10086,7 @@ No match ------------------------------------------------------------------ ACBD 0: ACBD - *** Failers -No match +\= Expect no match A\nB No match ACB\n @@ -10230,8 +10106,7 @@ No match 0: ACBD ACB\n 0: ACB\x0a - *** Failers -No match +\= Expect no match A\nB No match @@ -10240,8 +10115,7 @@ No match 0: A\x0aB A\rB 0: A\x0dB - ** Failers -No match +\= Expect no match A\r\nB No match @@ -10352,6 +10226,7 @@ No match Ket End ------------------------------------------------------------------ +\= Expect no match X\x0d\x0a No match @@ -10407,26 +10282,30 @@ Partial match: abc Partial match: abc /abc\B/ - abc -No match abc\=ps Partial match: abc abc\=ph Partial match: abc +\= Expect no match + abc +No match /.+/ +\= Bad offsets + abc\=offset=4 +Failed: error -33: bad offset value + abc\=offset=-4 +** Invalid value in 'offset=-4' +\= Valid data abc\=offset=0 0: abc abc\=offset=1 0: bc abc\=offset=2 0: c +\= Expect no match abc\=offset=3 No match - abc\=offset=4 -Failed: error -33: bad offset value - abc\=offset=-4 -** Invalid value in 'offset=-4' /^\cÄ£/ Failed: error 168 at offset 3: \c must be followed by a printable ASCII character @@ -10549,8 +10428,7 @@ Failed: error 115 at offset 15: reference to non-existent subpattern 0: aaaaX 1: a 2: X - ** Failers -No match +\= Expect no match aaaa No match @@ -10558,8 +10436,7 @@ No match aaaaX 0: aaaaX 1: X - ** Failers -No match +\= Expect no match aaaa No match @@ -10743,8 +10620,7 @@ Subject length lower bound = 1 /(?1)(?:(b(*ACCEPT))){0}c/ bc 0: bc - ** Failers -No match +\= Expect no match b No match @@ -10755,6 +10631,7 @@ No match 0: c /^.*?(?(?=a)a|b(*THEN)c)/ +\= Expect no match ba No match @@ -10763,14 +10640,17 @@ No match 0: ba /^.*?(?(?=a)a(*THEN)b|c)/ +\= Expect no match ac No match /^.*?(?(?=a)a(*THEN)b)c/ +\= Expect no match ac No match /^.*?(a(*THEN)b)c/ +\= Expect no match aabc No match @@ -10796,10 +10676,12 @@ No match 0: C 1: C MK: A +\= Expect no match D No match, mark = A /(*:A)A+(*SKIP:A)(B|Z)/mark +\= Expect no match AAAC No match, mark = A @@ -10820,6 +10702,7 @@ No match, mark = A /(?>(*ACCEPT)b)c/ c 0: +\= Expect no match c\=notempty No match @@ -11144,6 +11027,7 @@ Latest Mark: B 1: aeq /.(*F)/ +\= Expect no match abc\=ph No match @@ -11176,14 +11060,15 @@ Subject length lower bound = 0 0: x 'a*(*ACCEPT)b'aftertext - \=notempty_atstart -No match abc\=notempty_atstart 0: a 0+ bc bbb\=notempty_atstart 0: 0+ bb +\= Expect no match + \=notempty_atstart +No match /(*ACCEPT)a/I,aftertext Capturing subpattern count = 0 @@ -11219,8 +11104,7 @@ Subject length lower bound = 0 aaaazzzzb 0: aaaazzzzb 1: zzzz - ** Failers -No match +\= Expect no match aazz No match @@ -11236,6 +11120,7 @@ No match 1: c /(.)((?(1)c|a)|a(?2))/ +\= Expect no match baa No match @@ -11269,8 +11154,7 @@ No match /^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aAz 0: aAz - *** Failers -No match +\= Expect no match ax41z No match @@ -11285,8 +11169,7 @@ No match /^a\u0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aAz 0: aAz - *** Failers -No match +\= Expect no match au0041z No match @@ -11297,16 +11180,14 @@ No match /^a\u041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames au041z 0: au041z - *** Failers -No match +\= Expect no match aAz No match /^a\U0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aU0041z 0: aU0041z - *** Failers -No match +\= Expect no match aAz No match @@ -11379,8 +11260,7 @@ MK: A 4: X 5: Y MK: B - ** Failers -No match +\= Expect no match XAQQ No match, mark = A XAQQXZZ @@ -11397,8 +11277,7 @@ No match, mark = B aw 0: aw MK: n - ** Failers -No match, mark = n +\= Expect no match abc No match, mark = m @@ -11406,8 +11285,7 @@ No match, mark = m aw 0: aw MK: n - ** Failers -No match, mark = n +\= Expect no match abc No match, mark = m @@ -11964,10 +11842,11 @@ Partial match: 123a 0: ad /^(?!a(*THEN)b|ac)../ - ac -No match ad 0: ad +\= Expect no match + ac +No match /^(?=a(*THEN)b|ac)/ ac @@ -12004,6 +11883,7 @@ No match 0: bn /(?(?=b(*SKIP)a)bn|bnn)/ +\= Expect no match bnn No match @@ -13388,8 +13268,7 @@ Failed: error 144 at offset 5: group name must start with a non-digit 0: red put it all on red 0: red - ** Failers -No match +\= Expect no match no reduction No match Alfred Winifred @@ -13405,6 +13284,7 @@ Start of matched string is beyond its end - displaying from end to start. 0+ abcd /abcd/newline=lf,firstline +\= Expect no match xx\nxabcd No match @@ -13469,8 +13349,7 @@ Failed: error 115 at offset 2: reference to non-existent subpattern 0: abc: 12 0: 12 - *** Failers -No match +\= Expect no match 123 No match xyz @@ -13546,8 +13425,7 @@ Capturing subpattern count = 0 Subject length lower bound = 6 yesnononoyes 0: nonono - ** Failers -No match +\= Expect no match yesno No match @@ -13563,8 +13441,7 @@ Subject length lower bound = 5 1: abc xyzno 0: xyzno - ** Failers -No match +\= Expect no match abcno No match xyzyes @@ -13786,6 +13663,7 @@ Failed: error -48: no more memory 2: "(?(?=)==)(((((((((?=)))))))))" +\= Expect no match a No match @@ -13860,6 +13738,7 @@ Capturing subpattern count = 0 Options: auto_callout First code unit at start or follows newline Subject length lower bound = 1 +\= Expect no match aaa --->aaa +0 ^ .* @@ -13873,6 +13752,7 @@ No match Capturing subpattern count = 0 Options: auto_callout no_dotstar_anchor Subject length lower bound = 1 +\= Expect no match aaa --->aaa +0 ^ .* @@ -13967,8 +13847,7 @@ Failed: error 109 at offset 7: quantifier does not follow a repeatable item 0: 00765 456 0: 456 - ** Failers -No match +\= Expect no match 356 No match @@ -14232,8 +14111,7 @@ Callout (5): 'x\x00z' /(?(?!)a|b)/ bbb 0: b - ** Failers -No match +\= Expect no match aaa No match @@ -14336,6 +14214,7 @@ Subject length lower bound = 0 Failed: error 183 at offset 3: using \C is disabled by the application /abc/ +\= Expect no match \[9x!xxx(]{9999} No match @@ -14676,6 +14555,7 @@ Subject length lower bound = 0 0: ab /^a(*PRUNE)b/s +\= Expect no match aab No match @@ -14690,6 +14570,7 @@ Failed: error 161 at offset 13: number is too big Failed: error 161 at offset 16: number is too big /0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/ +\= Expect no match 01 No match @@ -14707,10 +14588,12 @@ Failed: error 160 at offset 21: (*VERB) not recognized or malformed 0: abab ababab 0: ababab +\= Expect no match aba No match /((*MARK:A))++a(*SKIP:B)b/ +\= Expect no match aacb No match diff --git a/testdata/testoutput20 b/testdata/testoutput20 index 3dcf51b..e923080 100644 --- a/testdata/testoutput20 +++ b/testdata/testoutput20 @@ -53,6 +53,7 @@ Subject length lower bound = 6 0: C 1: C MK: A +\= Expect no match D No match, mark = A diff --git a/testdata/testoutput3 b/testdata/testoutput3 index dba3fc3..d9e8c5c 100644 --- a/testdata/testoutput3 +++ b/testdata/testoutput3 @@ -8,8 +8,7 @@ #forbid_utf /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -18,8 +17,7 @@ No match 0: École /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -28,30 +26,26 @@ No match 0: \xc9 /^[\W]+/locale=fr_FR - *** Failers - 0: *** +\= Expect no match École No match /[\b]/ \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /[\b]/locale=fr_FR \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /^\w+/ - *** Failers -No match +\= Expect no match École No match @@ -66,18 +60,14 @@ No match 2: cole /(.+)\b(.+)/locale=fr_FR - *** Failers - 0: *** Failers - 1: *** - 2: Failers +\= Expect no match École No match /École/i École 0: \xc9cole - *** Failers -No match +\= Expect no match école No match @@ -114,8 +104,7 @@ Subject length lower bound = 1 /^[\xc8-\xc9]/ École 0: É - *** Failers -No match +\= Expect no match école No match diff --git a/testdata/testoutput3A b/testdata/testoutput3A index 3044e45..5ce8c4a 100644 --- a/testdata/testoutput3A +++ b/testdata/testoutput3A @@ -8,8 +8,7 @@ #forbid_utf /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -18,8 +17,7 @@ No match 0: École /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -28,30 +26,26 @@ No match 0: \xc9 /^[\W]+/locale=fr_FR - *** Failers - 0: *** +\= Expect no match École No match /[\b]/ \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /[\b]/locale=fr_FR \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /^\w+/ - *** Failers -No match +\= Expect no match École No match @@ -66,18 +60,14 @@ No match 2: cole /(.+)\b(.+)/locale=fr_FR - *** Failers - 0: *** Failers - 1: *** - 2: Failers +\= Expect no match École No match /École/i École 0: \xc9cole - *** Failers -No match +\= Expect no match école No match @@ -114,8 +104,7 @@ Subject length lower bound = 1 /^[\xc8-\xc9]/ École 0: É - *** Failers -No match +\= Expect no match école No match diff --git a/testdata/testoutput3B b/testdata/testoutput3B index b99d6fd..b30fc5f 100644 --- a/testdata/testoutput3B +++ b/testdata/testoutput3B @@ -8,8 +8,7 @@ #forbid_utf /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -18,8 +17,7 @@ No match 0: École /^[\w]+/ - *** Failers -No match +\= Expect no match École No match @@ -28,30 +26,26 @@ No match 0: \xc9 /^[\W]+/locale=fr_FR - *** Failers - 0: *** +\= Expect no match École No match /[\b]/ \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /[\b]/locale=fr_FR \b 0: \x08 - *** Failers -No match +\= Expect no match a No match /^\w+/ - *** Failers -No match +\= Expect no match École No match @@ -66,18 +60,14 @@ No match 2: cole /(.+)\b(.+)/locale=fr_FR - *** Failers - 0: *** Failers - 1: *** - 2: Failers +\= Expect no match École No match /École/i École 0: \xc9cole - *** Failers -No match +\= Expect no match école No match @@ -114,8 +104,7 @@ Subject length lower bound = 1 /^[\xc8-\xc9]/ École 0: É - *** Failers -No match +\= Expect no match école No match diff --git a/testdata/testoutput4 b/testdata/testoutput4 index 6d6e5bf..743623a 100644 --- a/testdata/testoutput4 +++ b/testdata/testoutput4 @@ -13,8 +13,7 @@ 0: a\x{7f}b a\x{100}b 0: a\x{100}b - *** Failers -No match +\= Expect no match a\nb No match @@ -28,8 +27,7 @@ No match a\x{4000}\x{100}yb 0: a\x{4000}\x{100}yb 1: \x{4000}\x{100}y - *** Failers -No match +\= Expect no match a\x{4000}b No match ac\ncb @@ -105,8 +103,7 @@ No match a\x{1234}\x{4321}\x{3412}b 0: a\x{1234}\x{4321}\x{3412}b 1: \x{1234}\x{4321}\x{3412} - *** Failers -No match +\= Expect no match a\x{1234}b No match ac\ncb @@ -128,8 +125,7 @@ No match a\x{1234}\x{4321}\x{3412}\x{3421}b 0: a\x{1234}\x{4321}\x{3412}\x{3421}b 1: \x{1234}\x{4321}\x{3412}\x{3421} - *** Failers -No match +\= Expect no match a\x{1234}b No match @@ -149,8 +145,7 @@ No match a\x{1234}\x{4321}\x{3412}\x{3421}b 0: a\x{1234}\x{4321}\x{3412}\x{3421}b 1: \x{1234}\x{4321}\x{3412}\x{3421} - *** Failers -No match +\= Expect no match a\x{1234}b No match @@ -176,8 +171,7 @@ No match axxxxxbcdefghijb 0: axxxxxb 1: xxxxx - *** Failers -No match +\= Expect no match a\x{1234}b No match axxxxxxbcdefghijb @@ -205,16 +199,14 @@ No match axxxxxbcdefghijb 0: axxxxxb 1: xxxxx - *** Failers -No match +\= Expect no match a\x{1234}b No match axxxxxxbcdefghijb No match /^[a\x{c0}]/utf - *** Failers -No match +\= Expect no match \x{100} No match @@ -233,8 +225,7 @@ No match /(?:\x{100}){3}b/utf \x{100}\x{100}\x{100}b 0: \x{100}\x{100}\x{100}b - *** Failers -No match +\= Expect no match \x{100}\x{100}b No match @@ -243,8 +234,7 @@ No match 0: \x{ab} \xc2\xab 0: \x{ab} - *** Failers -No match +\= Expect no match \x00{ab} No match @@ -255,8 +245,7 @@ No match \x{256}XYZ 0: X 1: \x{256} - *** Failers -No match +\= Expect no match XYZ No match @@ -380,8 +369,7 @@ No match /\D+/utf 12abcd34 0: abcd - *** Failers - 0: *** Failers +\= Expect no match 1234 No match @@ -390,8 +378,7 @@ No match 0: abc 12ab34 0: ab - *** Failers - 0: *** +\= Expect no match 1234 No match 12a34 @@ -402,8 +389,7 @@ No match 0: ab 12ab34 0: ab - *** Failers - 0: ** +\= Expect no match 1234 No match 12a34 @@ -412,16 +398,13 @@ No match /\d+/utf 12abcd34 0: 12 - *** Failers -No match /\d{2,3}/utf 12abcd34 0: 12 1234abcd 0: 123 - *** Failers -No match +\= Expect no match 1.4 No match @@ -430,16 +413,14 @@ No match 0: 12 1234abcd 0: 12 - *** Failers -No match +\= Expect no match 1.4 No match /\S+/utf 12abcd34 0: 12abcd34 - *** Failers - 0: *** +\= Expect no match \ \ No match @@ -448,8 +429,7 @@ No match 0: 12a 1234abcd 0: 123 - *** Failers - 0: *** +\= Expect no match \ \ No match @@ -458,8 +438,7 @@ No match 0: 12 1234abcd 0: 12 - *** Failers - 0: ** +\= Expect no match \ \ No match @@ -467,8 +446,6 @@ No match 12> <34 0: > < 0+ 34 - *** Failers -No match />\s{2,3} < 0+ ce - *** Failers -No match +\= Expect no match ab> < 0+ ce - *** Failers -No match +\= Expect no match ab> ^`|~ No match !\"#%&'()*,-./:;?@[\\]_{} @@ -3731,6 +3604,7 @@ No match 2: \x{23a}\x{2c65}\x{23a} /^(\x{23a})\1*(....)/i,utf +\= Expect no match \x{23a}\x{2c65}\x{2c65}\x{2c65} No match \x{23a}\x{23a}\x{2c65}\x{23a} diff --git a/testdata/testoutput5 b/testdata/testoutput5 index f53f165..bf652df 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -11,14 +11,12 @@ # test 4. /^[\p{Arabic}]/utf - ** Failers -No match +\= Expect no match \x{061c} No match /^[[:graph:]]+$/utf,ucp - ** Failers -No match +\= Expect no match \x{61c} No match \x{2066} @@ -31,8 +29,7 @@ No match No match /^[[:print:]]+$/utf,ucp - ** Failers - 0: ** Failers +\= Expect no match \x{61c} No match \x{2066} @@ -76,6 +73,7 @@ No match 0: A\x{85}\x{2005}Z /^[[:graph:]]+$/utf,ucp +\= Expect no match \x{180e} No match @@ -88,6 +86,7 @@ No match 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{61c}\x{1680}\x{180e} /^[[:^print:]]+$/utf,ucp +\= Expect no match \x{180e} No match @@ -200,8 +199,7 @@ Overall options: anchored utf Subject length lower bound = 1 bar 0: b - *** Failers -No match +\= Expect no match c No match \x{ff} @@ -227,8 +225,7 @@ Subject length lower bound = 1 0: \x{ff} \x{100} 0: \x{100} - *** Failers - 0: * +\= Expect no match aaa No match @@ -251,8 +248,7 @@ No match \x{100}\x{100}"12" 0: \x{100}\x{100}"12" 1: "12" - *** Failers -No match +\= Expect no match \x{100}\x{100}abcd No match @@ -303,8 +299,7 @@ Failed: error 108 at offset 15: range out of order in character class 0: \x{100} \x{104} 0: \x{104} - *** Failers -No match +\= Expect no match \x{105} No match \x{ff} @@ -581,8 +576,7 @@ Matched, but too many substrings 0: a\x{2028}b a\x{2029}b 0: a\x{2029}b - ** Failers -No match +\= Expect no match a\n\rb No match @@ -623,8 +617,7 @@ No match 0: a\x{0a}\x{0d}b a\n\r\x{85}\x0cb 0: a\x{0a}\x{0d}\x{85}\x{0c}b - ** Failers -No match +\= Expect no match ab No match @@ -643,8 +636,7 @@ No match 0: a\x{0a}\x{0d}\x{0a}\x{0d}b a\n\n\r\nb 0: a\x{0a}\x{0a}\x{0d}\x{0a}b - ** Failers -No match +\= Expect no match a\n\n\n\rb No match a\r @@ -655,8 +647,7 @@ No match 0: X X\x{0a} X\x09X\x0b 0: X\x{09}X\x{0b} - ** Failers -No match +\= Expect no match \x{a0} X\x0a No match @@ -667,8 +658,7 @@ 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} - ** Failers -No match +\= Expect no match \x09\x20\x{a0}\x0a\x0b No match @@ -677,8 +667,7 @@ No match 0: \x{3001}\x{3000}\x{2030}\x{2028} X\x{180e}X\x{85} 0: X\x{180e}X\x{85} - ** Failers -No match +\= Expect no match \x{2009} X\x0a No match @@ -689,8 +678,7 @@ 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} - ** Failers -No match +\= Expect no match \x09\x{200a}\x{a0}\x{2028}\x0b No match @@ -755,8 +743,7 @@ Subject length lower bound = 3 0: a\x{0a}b a\r\nb 0: a\x{0d}\x{0a}b - ** Failers -No match +\= Expect no match a\x{85}b No match a\x0bb @@ -793,8 +780,7 @@ Subject length lower bound = 2 0: a\x{0a}b a\r\nb 0: a\x{0d}\x{0a}b - ** Failers -No match +\= Expect no match a\x{85}b No match a\x0bb @@ -817,14 +803,11 @@ Subject length lower bound = 2 0: a\x{85}b a\x0bb 0: a\x{0b}b - ** Failers -No match /.*a.*=.b.*/utf,newline=any QQQ\x{2029}ABCaXYZ=!bPQR 0: ABCaXYZ=!bPQR - ** Failers -No match +\= Expect no match a\x{2029}b No match \x61\xe2\x80\xa9\x62 @@ -838,8 +821,7 @@ Failed: error 130 at offset 3: unknown POSIX class name 0: a\x{1234}b a\nb 0: a\x{0a}b - ** Failers -No match +\= Expect no match ab No match @@ -848,8 +830,7 @@ No match 0: aXb a\nX\nX\x{1234}b 0: a\x{0a}X\x{0a}X\x{1234}b - ** Failers -No match +\= Expect no match ab No match @@ -935,6 +916,7 @@ Partial match: X\x{123}\x{123}\x{123} Partial match: X\x{123}\x{123}\x{123}\x{123} /X\x{123}{2,4}b/utf +\= Expect no match Xx\=ps No match X\x{123}x\=ps @@ -947,6 +929,7 @@ No match No match /X\x{123}{2,4}?b/utf +\= Expect no match Xx\=ps No match X\x{123}x\=ps @@ -959,6 +942,7 @@ No match No match /X\x{123}{2,4}+b/utf +\= Expect no match Xx\=ps No match X\x{123}x\=ps @@ -1745,6 +1729,7 @@ Last code unit = 'y' Subject length lower bound = 2 /(?\x{1680} >\x{a0} 0: >\x{a0} - ** Failers -No match +\= Expect no match \x{0b} No match @@ -2278,8 +2249,7 @@ No match 0: >\x{1680} >\x{a0} 0: >\x{a0} - ** Failers -No match +\= Expect no match \x{0b} No match @@ -2324,8 +2294,7 @@ No match 0: \x{10a7} _ABC 0: _ - ** Failers -No match +\= Expect no match [] No match @@ -2362,8 +2331,7 @@ No match 0: \x{10a7} _ABC 0: _ - ** Failers -No match +\= Expect no match [] No match @@ -2630,8 +2598,7 @@ No match /\b...\B/utf abc_ 0: abc - ** Failers - 0: Fai +\= Expect no match \x{37e}abc\x{376} No match \x{37e}\x{376}\x{371}\x{393}\x{394} @@ -2825,10 +2792,12 @@ No match # These behaved oddly in Perl, so they are kept in this test /(\x{23a}\x{23a}\x{23a})?\1/i,utf +\= Expect no match \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65} No match /(ȺȺȺ)?\1/i,utf +\= Expect no match ȺȺȺⱥⱥ No match @@ -2843,10 +2812,12 @@ No match 1: \x{23a}\x{23a}\x{23a} /(\x{23a}\x{23a}\x{23a})\1/i,utf +\= Expect no match \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65} No match /(ȺȺȺ)\1/i,utf +\= Expect no match ȺȺȺⱥⱥ No match @@ -2887,8 +2858,7 @@ No match 0: \x{1bc0} \x{1bff} 0: \x{1bff} - ** Failers -No match +\= Expect no match \x{1bf4} No match @@ -2897,8 +2867,7 @@ No match 0: \x{11000} \x{1106f} 0: \x{1106f} - ** Failers -No match +\= Expect no match \x{1104e} No match @@ -2907,8 +2876,7 @@ No match 0: \x{840} \x{85e} 0: \x{85e} - ** Failers -No match +\= Expect no match \x{85c} No match \x{85d} @@ -2933,8 +2901,7 @@ No match /^a\X41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames aX41z 0: aX41z - *** Failers -No match +\= Expect no match aAz No match @@ -3138,8 +3105,7 @@ Subject length lower bound = 3 0+ /\x{3a3}++./i,utf,aftertext - ** Failers -No match +\= Expect no match \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2} No match @@ -3179,24 +3145,29 @@ No match Ket End ------------------------------------------------------------------ +\= Expect no match ikt No match /is+t/i,utf iSs\x{17f}t 0: iSs\x{17f}t +\= Expect no match ikt No match /is+?t/i,utf +\= Expect no match ikt No match /is?t/i,utf +\= Expect no match ikt No match /is{2}t/i,utf +\= Expect no match iskt No match @@ -3211,80 +3182,70 @@ No match 0: ` \x{1234}abc 0: \x{1234} - ** Failers -No match +\= Expect no match abc No match /^\p{Xuc}+/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}+?/utf $@`\x{a0}\x{1234}\x{e000}** 0: $ - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}+?\*/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000}* - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}++/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}{3,5}/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234} - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}{3,5}?/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@` - ** Failers -No match +\= Expect no match \x{9f} No match /^[\p{Xuc}]/utf $@`\x{a0}\x{1234}\x{e000}** 0: $ - ** Failers -No match +\= Expect no match \x{9f} No match /^[\p{Xuc}]+/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match /^\P{Xuc}/utf abc 0: a - ** Failers - 0: * +\= Expect no match $abc No match @abc @@ -3297,8 +3258,7 @@ No match /^[\P{Xuc}]/utf abc 0: a - ** Failers - 0: * +\= Expect no match $abc No match @abc @@ -4053,10 +4013,12 @@ Failed: error 124 at offset 113: letter or underscore expected after (?< or (?' /\C\X*TÓ…; {0,6}\v+ F /utf +\= Expect no match Ó…\x0a No match /\C(\W?Å¿)'?{{/utf +\= Expect no match \\C(\\W?Å¿)'?{{ No match diff --git a/testdata/testoutput6 b/testdata/testoutput6 index f52af6f..e793a41 100644 --- a/testdata/testoutput6 +++ b/testdata/testoutput6 @@ -23,8 +23,7 @@ 0: abc abbbbbbc 0: abbbbbbc - *** Failers -No match +\= Expect no match ac No match ab @@ -79,8 +78,7 @@ Matched, but offsets vector is too small to show all matches /^abc/ abcdef 0: abc - *** Failers -No match +\= Expect no match xyzabc No match xyz\nabc @@ -91,16 +89,14 @@ No match 0: abc xyz\nabc 0: abc - *** Failers -No match +\= Expect no match xyzabc No match /\Aabc/ abcdef 0: abc - *** Failers -No match +\= Expect no match xyzabc No match xyz\nabc @@ -109,8 +105,7 @@ No match /\Aabc/m abcdef 0: abc - *** Failers -No match +\= Expect no match xyzabc No match xyz\nabc @@ -121,8 +116,7 @@ No match 0: abc xyzabc\=offset=3 0: abc - *** Failers -No match +\= Expect no match xyzabc No match xyzabc\=offset=2 @@ -133,8 +127,7 @@ No match 0: x9yzz x0y+z 0: x0y+z - *** Failers -No match +\= Expect no match xyz No match xxy0z @@ -145,8 +138,7 @@ No match 0: x yzz x y+z 0: x y+z - *** Failers -No match +\= Expect no match xyz No match xxyyz @@ -155,8 +147,7 @@ No match /x\wy\Wz/ xxy+z 0: xxy+z - *** Failers -No match +\= Expect no match xxy0z No match x+y+z @@ -167,8 +158,7 @@ No match 0: x+y x-y 0: x-y - *** Failers -No match +\= Expect no match x\ny No match @@ -187,8 +177,7 @@ No match 0: a+bc\x0adp+q x\nyp+q 0: x\x0ayp+q - *** Failers -No match +\= Expect no match a\nbc\ndp+q No match a+bc\ndp\nq @@ -199,8 +188,7 @@ No match /a\d\z/ ba0 0: a0 - *** Failers -No match +\= Expect no match ba0\n No match ba0\ncd @@ -209,8 +197,7 @@ No match /a\d\z/m ba0 0: a0 - *** Failers -No match +\= Expect no match ba0\n No match ba0\ncd @@ -221,8 +208,7 @@ No match 0: a0 ba0\n 0: a0 - *** Failers -No match +\= Expect no match ba0\ncd No match @@ -231,8 +217,7 @@ No match 0: a0 ba0\n 0: a0 - *** Failers -No match +\= Expect no match ba0\ncd No match @@ -241,8 +226,7 @@ No match 0: a0 ba0\n 0: a0 - *** Failers -No match +\= Expect no match ba0\ncd No match @@ -253,8 +237,6 @@ No match 0: a0 ba0\ncd 0: a0 - *** Failers -No match /abc/i abc @@ -289,8 +271,7 @@ No match 0: xxxyz axxxxyzq 0: xxxyz - *** Failers -No match +\= Expect no match ax No match axx @@ -301,8 +282,7 @@ No match 0: xxxyz axxxxyzq 0: xxxyz - *** Failers -No match +\= Expect no match ax No match axx @@ -321,8 +301,7 @@ No match 0: xxxyz axxxxyzq 0: xxxyz - *** Failers -No match +\= Expect no match ax No match axx @@ -341,12 +320,7 @@ No match 2: bcd 3: bc 4: b - *** Failers - 0: *** F - 1: *** - 2: *** - 3: ** - 4: * +\= Expect no match aaaaa No match @@ -360,13 +334,6 @@ No match 2: bcd 3: bc 4: b - 5: - *** Failers - 0: *** F - 1: *** - 2: *** - 3: ** - 4: * 5: aaaaa 0: @@ -385,10 +352,7 @@ No match 0: bcdef 1: bcde 2: bcd - *** Failers - 0: *** F - 1: *** - 2: *** +\= Expect no match axya No match axa @@ -411,16 +375,14 @@ No match /\d+/ ab1234c56 0: 1234 - *** Failers -No match +\= Expect no match xyz No match /\D+/ ab123c56 0: ab - *** Failers - 0: *** Failers +\= Expect no match 789 No match @@ -429,8 +391,7 @@ No match 0: 5A ABC 0: A - *** Failers -No match +\= Expect no match XYZ No match @@ -441,8 +402,6 @@ No match 0: BA 9ABC 0: A - *** Failers -No match /a+/ aaaa @@ -459,8 +418,7 @@ No match 0: abcdxyz axyz 0: axyz - *** Failers -No match +\= Expect no match xyz No match @@ -475,8 +433,7 @@ No match 0: 12X 123X 0: 123X - *** Failers -No match +\= Expect no match X No match 1X @@ -493,8 +450,7 @@ No match 0: c9 d04 0: d0 - *** Failers -No match +\= Expect no match e45 No match abcd @@ -517,8 +473,7 @@ No match 0: abcd1 1234 0: 1 - *** Failers -No match +\= Expect no match e45 No match abcd @@ -535,8 +490,7 @@ No match 0: d0 abcd1234 0: abcd1 - *** Failers -No match +\= Expect no match 1234 No match e45 @@ -561,8 +515,7 @@ No match 0: d0 1234 0: 1 - *** Failers -No match +\= Expect no match abcd1234 No match e45 @@ -573,8 +526,7 @@ No match 0: ab4 bcd93 0: bcd9 - *** Failers -No match +\= Expect no match 1234 No match a36 @@ -591,16 +543,13 @@ No match 0: abcabcabc4 42xyz 0: 4 - *** Failers -No match /^(abc)+\d/ abc45 0: abc4 abcabcabc45 0: abcabcabc4 - *** Failers -No match +\= Expect no match 42xyz No match @@ -609,8 +558,7 @@ No match 0: abc4 42xyz 0: 4 - *** Failers -No match +\= Expect no match abcabcabc45 No match @@ -619,8 +567,7 @@ No match 0: abcabc4 abcabcabc45 0: abcabcabc4 - *** Failers -No match +\= Expect no match abcabcabcabc45 No match abc45 @@ -651,8 +598,7 @@ No match 0: a(b)c a(b(c))d 0: a(b(c))d - *** Failers) -No match +\= Expect no match) a(b(c)d No match @@ -667,8 +613,7 @@ No match /^(?>a*)\d/ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9 - *** Failers -No match +\= Expect no match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -685,8 +630,7 @@ No match 0: def> 0: <> - *** Failers -No match +\= Expect no match >>>abcxyzpqrrrabbxyyyypqAzz 0: abcxyzpqrrrabbxyyyypqAzz - *** Failers -No match +\= Expect no match abxyzpqrrabbxyyyypqAzz No match abxyzpqrrrrabbxyyyypqAzz @@ -1080,8 +1007,7 @@ No match 0: abczz abcabczz 0: abcabczz - *** Failers -No match +\= Expect no match zz No match abcabcabczz @@ -1106,8 +1032,7 @@ No match 0: abbbbbbbbbbbc bbbbbbbbbbbac 0: bbbbbbbbbbbac - *** Failers -No match +\= Expect no match aaac No match abbbbbbbbbbbac @@ -1130,8 +1055,7 @@ No match 0: abbbbbbbbbbbc bbbbbbbbbbbac 0: bbbbbbbbbbbac - *** Failers -No match +\= Expect no match aaac No match abbbbbbbbbbbac @@ -1148,8 +1072,7 @@ No match 0: bbabc bababc 0: bababc - *** Failers -No match +\= Expect no match bababbc No match babababc @@ -1162,8 +1085,7 @@ No match 0: bbabc bababc 0: bababc - *** Failers -No match +\= Expect no match bababbc No match babababc @@ -1186,8 +1108,7 @@ No match 0: d ething 0: e - *** Failers -No match +\= Expect no match fthing No match [thing @@ -1204,8 +1125,7 @@ No match 0: d ething 0: e - *** Failers -No match +\= Expect no match athing No match fthing @@ -1218,8 +1138,7 @@ No match 0: [ \\thing 0: \ - *** Failers - 0: * +\= Expect no match athing No match bthing @@ -1238,8 +1157,7 @@ No match 0: a fthing 0: f - *** Failers - 0: * +\= Expect no match ]thing No match cthing @@ -1282,8 +1200,7 @@ No match 0: 10 100 0: 100 - *** Failers -No match +\= Expect no match abc No match @@ -1300,8 +1217,7 @@ No match 0: xxx0 xxx1234 0: xxx1234 - *** Failers -No match +\= Expect no match xxx No match @@ -1312,12 +1228,11 @@ No match 0: xx123 123456 0: 123456 - *** Failers -No match - 123 -No match x1234 0: x1234 +\= Expect no match + 123 +No match /^.+?[0-9][0-9][0-9]$/ x123 @@ -1326,18 +1241,16 @@ No match 0: xx123 123456 0: 123456 - *** Failers -No match - 123 -No match x1234 0: x1234 +\= Expect no match + 123 +No match /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ abc!pqr=apquxz.ixr.zzz.ac.uk 0: abc!pqr=apquxz.ixr.zzz.ac.uk - *** Failers -No match +\= Expect no match !pqr=apquxz.ixr.zzz.ac.uk No match abc!=apquxz.ixr.zzz.ac.uk @@ -1350,7 +1263,8 @@ No match /:/ Well, we need a colon: somewhere 0: : - *** Fail if we don't +\= Expect no match + No match without a colon No match /([\da-f:]+)$/i @@ -1370,8 +1284,7 @@ No match 0: def Any old stuff 0: ff - *** Failers -No match +\= Expect no match 0zzz No match gzzz @@ -1386,8 +1299,7 @@ No match 0: .1.2.3 A.12.123.0 0: A.12.123.0 - *** Failers -No match +\= Expect no match .1.2.3333 No match 1.2.3 @@ -1400,8 +1312,7 @@ No match 0: 1 IN SOA non-sp1 non-sp2( 1 IN SOA non-sp1 non-sp2 ( 0: 1 IN SOA non-sp1 non-sp2 ( - *** Failers -No match +\= Expect no match 1IN SOA non-sp1 non-sp2( No match @@ -1418,8 +1329,7 @@ No match 0: sxk.zzz.ac.uk. x-.y-. 0: x-.y-. - *** Failers -No match +\= Expect no match -abc.peq. No match @@ -1432,8 +1342,7 @@ No match 0: *.c3-b.c *.c-a.b-c 0: *.c-a.b-c - *** Failers -No match +\= Expect no match *.0 No match *.a- @@ -1470,22 +1379,18 @@ No match 0: "abcd" ; \"\" ; rhubarb 0: "" ; rhubarb - *** Failers -No match +\= Expect no match \"1234\" : things No match /^$/ \ 0: - *** Failers -No match / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x ab c 0: ab c - *** Failers -No match +\= Expect no match abc No match ab cde @@ -1494,8 +1399,7 @@ No match /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/ ab c 0: ab c - *** Failers -No match +\= Expect no match abc No match ab cde @@ -1506,8 +1410,7 @@ No match 0: a bcd a b d 0: a b d - *** Failers -No match +\= Expect no match abcd No match ab d @@ -1622,8 +1525,7 @@ No match 0: 12345678ab 12345678__ 0: 12345678__ - *** Failers -No match +\= Expect no match 1234567 No match @@ -1636,8 +1538,7 @@ No match 0: 12345 aaaaa 0: aaaaa - *** Failers -No match +\= Expect no match 123456 No match @@ -1665,8 +1566,7 @@ No match 0: From abcd Mon Sep 01 12:33 From abcd Mon Sep 1 12:33:02 1997 0: From abcd Mon Sep 1 12:33 - *** Failers -No match +\= Expect no match From abcd Sep 01 12:33:02 1997 No match @@ -1697,8 +1597,7 @@ No match /^(\D*)(?=\d)(?!123)/ abc456 0: abc - *** Failers -No match +\= Expect no match abc123 No match @@ -1724,16 +1623,14 @@ No match /(?!^)abc/ the abc 0: abc - *** Failers -No match +\= Expect no match abc No match /(?=^)abc/ abc 0: abc - *** Failers -No match +\= Expect no match the abc No match @@ -1989,8 +1886,7 @@ No match A missing angle .*/)foo" +\= Expect no match /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ No match @@ -3709,16 +3568,14 @@ No match 0: .230003938 1.875000282 0: .875000282 - *** Failers -No match +\= Expect no match 1.235 No match /^((?>\w+)|(?>\s+))*$/ now is the time for all good men to come to the aid of the party 0: now is the time for all good men to come to the aid of the party - *** Failers -No match +\= Expect no match this is not a line with only words and spaces! No match @@ -3738,8 +3595,7 @@ No match /((?>\d+))(\w)/ 12345a 0: 12345a - *** Failers -No match +\= Expect no match 12345+ No match @@ -3787,8 +3643,7 @@ No match 0: (abc) (abc(def)xyz) 0: (abc(def)xyz) - *** Failers -No match +\= Expect no match ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -3797,8 +3652,7 @@ No match 0: ab Ab 0: Ab - *** Failers -No match +\= Expect no match aB No match AB @@ -3807,8 +3661,7 @@ No match /(a (?x)b c)d e/ a bcd e 0: a bcd e - *** Failers -No match +\= Expect no match a b cd e No match abcd e @@ -3819,8 +3672,7 @@ No match /(a b(?x)c d (?-x)e f)/ a bcde f 0: a bcde f - *** Failers -No match +\= Expect no match abcdef No match @@ -3829,8 +3681,7 @@ No match 0: abc aBc 0: aBc - *** Failers -No match +\= Expect no match abC No match aBC @@ -3849,8 +3700,7 @@ No match 0: abc aBc 0: aBc - *** Failers -No match +\= Expect no match ABC No match abC @@ -3863,8 +3713,7 @@ No match 0: aBc aBBc 0: aBBc - *** Failers -No match +\= Expect no match aBC No match aBBC @@ -3875,8 +3724,7 @@ No match 0: abcd abCd 0: abCd - *** Failers -No match +\= Expect no match aBCd No match abcD @@ -3889,8 +3737,7 @@ No match 0: more than MILLION more \n than Million 0: more \x0a than Million - *** Failers -No match +\= Expect no match MORE THAN MILLION No match more \n than \n million @@ -3903,8 +3750,7 @@ No match 0: more than MILLION more \n than Million 0: more \x0a than Million - *** Failers -No match +\= Expect no match MORE THAN MILLION No match more \n than \n million @@ -3917,8 +3763,7 @@ No match 0: aBbc aBBc 0: aBBc - *** Failers -No match +\= Expect no match Abc No match abAb @@ -3931,8 +3776,7 @@ No match 0: abc aBc 0: aBc - *** Failers -No match +\= Expect no match Ab No match abC @@ -3945,8 +3789,7 @@ No match 0: xxc aBxxc 0: xxc - *** Failers -No match +\= Expect no match Abxxc No match ABxxc @@ -3959,8 +3802,7 @@ No match 0: abc: 12 0: 12 - *** Failers -No match +\= Expect no match 123 No match xyz @@ -3971,8 +3813,7 @@ No match 0: abc: 12 0: 12 - *** Failers -No match +\= Expect no match 123 No match xyz @@ -3987,8 +3828,7 @@ No match 0: cat focat 0: cat - *** Failers -No match +\= Expect no match foocat No match @@ -4001,8 +3841,7 @@ No match 0: cat focat 0: cat - *** Failers -No match +\= Expect no match foocat No match @@ -4183,8 +4022,7 @@ No match 0: 12-sep-98 12-09-98 0: 12-09-98 - *** Failers -No match +\= Expect no match sep-12-98 No match @@ -4213,8 +4051,7 @@ No match 0: bbx BBx 0: BBx - *** Failers -No match +\= Expect no match abcX No match aBCX @@ -4239,8 +4076,7 @@ No match 0: f France 0: F - *** Failers -No match +\= Expect no match Africa No match @@ -4257,8 +4093,7 @@ No match 0: z Zambesi 0: Z - *** Failers -No match +\= Expect no match aCD No match XY @@ -4267,8 +4102,7 @@ No match /(?<=foo\n)^bar/m foo\nbar 0: bar - *** Failers -No match +\= Expect no match bar No match baz\nbar @@ -4281,16 +4115,14 @@ No match 0: baz koobarbaz 0: baz - *** Failers -No match +\= Expect no match baz No match foobarbaz No match -/The following tests are taken from the Perl 5.005 test suite; some of them/ -/are compatible with 5.004, but I'd rather not have to sort them out./ -No match +# The following tests are taken from the Perl 5.005 test suite; some of them +# are compatible with 5.004, but I'd rather not have to sort them out. /abc/ abc @@ -4299,8 +4131,7 @@ No match 0: abc ababc 0: abc - *** Failers -No match +\= Expect no match xbc No match axc @@ -4335,8 +4166,7 @@ No match /ab+bc/ abbc 0: abbc - *** Failers -No match +\= Expect no match abc No match abq @@ -4359,8 +4189,7 @@ No match 0: abbbbc /ab{4,5}bc/ - *** Failers -No match +\= Expect no match abq No match abbbbc @@ -4389,8 +4218,7 @@ No match /^abc$/ abc 0: abc - *** Failers -No match +\= Expect no match abbbbc No match abcc @@ -4405,10 +4233,9 @@ No match /abc$/ aabc 0: abc - *** Failers -No match aabc 0: abc +\= Expect no match aabcd No match @@ -4433,8 +4260,7 @@ No match /a[bc]d/ abd 0: abd - *** Failers -No match +\= Expect no match axyzd No match abc @@ -4467,8 +4293,7 @@ No match /a[^bc]d/ aed 0: aed - *** Failers -No match +\= Expect no match abd No match abd @@ -4481,10 +4306,9 @@ No match /a[^]b]c/ adc 0: adc - *** Failers -No match a-c 0: a-c +\= Expect no match a]c No match @@ -4497,8 +4321,7 @@ No match 0: a /\by\b/ - *** Failers -No match +\= Expect no match xy No match yz @@ -4507,8 +4330,7 @@ No match No match /\Ba\B/ - *** Failers - 0: a +\= Expect no match a- No match -a @@ -4535,10 +4357,7 @@ No match /\W/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match a No match @@ -4549,10 +4368,7 @@ No match /a\Sb/ a-b 0: a-b - *** Failers -No match - a-b - 0: a-b +\= Expect no match a b No match @@ -4563,10 +4379,7 @@ No match /\D/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match 1 No match @@ -4577,10 +4390,7 @@ No match /[\W]/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match a No match @@ -4591,10 +4401,7 @@ No match /a[\S]b/ a-b 0: a-b - *** Failers -No match - a-b - 0: a-b +\= Expect no match a b No match @@ -4605,10 +4412,7 @@ No match /[\D]/ - 0: - - *** Failers - 0: * - - - 0: - +\= Expect no match 1 No match @@ -4635,6 +4439,9 @@ No match 0: a((b /a\\b/ + a\\b + 0: a\b +\= Expect no match a\b No match @@ -4696,14 +4503,11 @@ No match 0: cde /abc/ - *** Failers -No match +\= Expect no match b No match - /a*/ - /([abc])*d/ abbbcd @@ -4775,8 +4579,7 @@ No match 0: adcdcde /a[bcd]+dcdcde/ - *** Failers -No match +\= Expect no match abcde No match adcdcde @@ -4805,8 +4608,7 @@ No match 0: ij reffgz 0: effgz - *** Failers -No match +\= Expect no match effg No match bcdd @@ -4821,8 +4623,7 @@ No match 0: a /multiple words of text/ - *** Failers -No match +\= Expect no match aa No match uh-uh @@ -4861,8 +4662,7 @@ No match 0: ABC ABABC 0: ABC - *** Failers -No match +\= Expect no match aaxabxbaxbbx No match XBC @@ -4895,8 +4695,7 @@ No match 0: ABBC /ab+bc/i - *** Failers -No match +\= Expect no match ABC No match ABQ @@ -4921,8 +4720,7 @@ No match 0: ABBBBC /ab{4,5}?bc/i - *** Failers -No match +\= Expect no match ABQ No match ABBBBC @@ -4951,8 +4749,7 @@ No match /^abc$/i ABC 0: ABC - *** Failers -No match +\= Expect no match ABBBBC No match ABCC @@ -4987,10 +4784,9 @@ No match 0: AXYZC /a.*c/i - *** Failers -No match AABC 0: AABC +\= Expect no match AXYZD No match @@ -5001,8 +4797,7 @@ No match /a[b-d]e/i ACE 0: ACE - *** Failers -No match +\= Expect no match ABC No match ABD @@ -5035,8 +4830,7 @@ No match /a[^-b]c/i ADC 0: ADC - *** Failers -No match +\= Expect no match ABD No match A-C @@ -5057,8 +4851,7 @@ No match 0: EF /$b/i - *** Failers -No match +\= Expect no match A]C No match B @@ -5075,6 +4868,7 @@ No match 0: A((B /a\\b/i +\= Expect no match A\=notbol No match @@ -5153,7 +4947,6 @@ No match /abc/i /a*/i - /([abc])*d/i ABBBCD @@ -5190,6 +4983,7 @@ No match 0: HIJ /^(ab|cd)e/i +\= Expect no match ABCDE No match @@ -5251,8 +5045,7 @@ No match 0: IJ REFFGZ 0: EFFGZ - *** Failers -No match +\= Expect no match ADCDCDE No match EFFG @@ -5277,8 +5070,7 @@ No match 0: C /multiple words of text/i - *** Failers -No match +\= Expect no match AA No match UH-UH @@ -5424,8 +5216,7 @@ No match /(?<=a)b/ ab 0: b - *** Failers -No match +\= Expect no match cb No match b @@ -5490,8 +5281,7 @@ No match 0: Ab /(?:(?i)a)b/ - *** Failers -No match +\= Expect no match cb No match aB @@ -5516,8 +5306,7 @@ No match 0: Ab /(?i:a)b/ - *** Failers -No match +\= Expect no match aB No match aB @@ -5542,10 +5331,9 @@ No match 0: aB /(?:(?-i)a)b/i - *** Failers -No match aB 0: aB +\= Expect no match Ab No match @@ -5560,8 +5348,7 @@ No match 0: aB /(?:(?-i)a)b/i - *** Failers -No match +\= Expect no match Ab No match AB @@ -5586,8 +5373,7 @@ No match 0: aB /(?-i:a)b/i - *** Failers -No match +\= Expect no match AB No match Ab @@ -5604,8 +5390,7 @@ No match 0: aB /(?-i:a)b/i - *** Failers -No match +\= Expect no match Ab No match AB @@ -5614,8 +5399,7 @@ No match /((?-i:a))b/i /((?-i:a.))b/i - *** Failers -No match +\= Expect no match AB No match a\nB @@ -5651,8 +5435,7 @@ No match 0: aaac /(?.*)(?<=(abcd|wxyz))/ alphabetabcd 0: alphabetabcd endingwxyz 0: endingwxyz - *** Failers -No match +\= Expect no match a rather long string that doesn't end with one of them No match /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/ word cat dog elephant mussel cow horse canary baboon snake shark otherword 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark No match /word (?>[a-zA-Z0-9]+ ){0,30}otherword/ +\= Expect no match word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope No match @@ -5870,8 +5647,7 @@ No match 0: foo 123999foo 0: foo - *** Failers -No match +\= Expect no match 123abcfoo No match @@ -5880,8 +5656,7 @@ No match 0: foo 123999foo 0: foo - *** Failers -No match +\= Expect no match 123abcfoo No match @@ -5890,8 +5665,7 @@ No match 0: foo 123456foo 0: foo - *** Failers -No match +\= Expect no match 123999foo No match @@ -5900,8 +5674,7 @@ No match 0: foo 123456foo 0: foo - *** Failers -No match +\= Expect no match 123999foo No match @@ -5949,8 +5722,7 @@ No match 0: - 0digit 0: 0 - *** Failers -No match +\= Expect no match bcdef No match @@ -5979,7 +5751,8 @@ No match 0: x /(?!^)x/m - a\nxb\n +\= Expect no match + a\nxb\n No match /abc\Qabc\Eabc/ @@ -5993,8 +5766,7 @@ No match / abc\Q abc\Eabc/x abc abcabc 0: abc abcabc - *** Failers -No match +\= Expect no match abcabcabc No match @@ -6034,8 +5806,7 @@ No match /\Gabc/ abc 0: abc - *** Failers -No match +\= Expect no match xyzabc No match @@ -6053,8 +5824,7 @@ No match /a(?x: b c )d/ XabcdY 0: abcd - *** Failers -No match +\= Expect no match Xa b c d Y No match @@ -6067,8 +5837,7 @@ No match /(?i)AB(?-i)C/ XabCY 0: abC - *** Failers -No match +\= Expect no match XabcY No match @@ -6077,8 +5846,7 @@ No match 0: abCE DE 0: DE - *** Failers -No match +\= Expect no match abcE No match abCe @@ -6099,12 +5867,12 @@ No match 0: d ] 0: ] - *** Failers - 0: a +\= Expect no match b No match /(a+)*b/ +\= Expect no match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match @@ -6151,22 +5919,21 @@ Failed: error -40: backreference condition or recursion test is not supported fo /line\nbreak/firstline this is a line\nbreak 0: line\x0abreak - ** Failers -No match +\= Expect no match line one\nthis is a line\nbreak in the second line No match /line\nbreak/m,firstline this is a line\nbreak 0: line\x0abreak - ** Failers -No match +\= Expect no match line one\nthis is a line\nbreak in the second line No match /1234/ 123\=ps Partial match: 123 +\= Expect no match a4\=ps,dfa_restart No match @@ -6239,8 +6006,7 @@ Subject length lower bound = 3 0: abc xyz\r\nabc 0: abc - ** Failers -No match +\= Expect no match xyz\rabc No match xyzabc\r @@ -6261,8 +6027,7 @@ Last code unit = 'c' Subject length lower bound = 3 xyz\r\nabclf> 0: abc - ** Failers -No match +\= Expect no match xyz\nabclf No match xyz\rabclf @@ -6277,8 +6042,7 @@ Last code unit = 'c' Subject length lower bound = 3 xyz\rabc 0: abc - ** Failers -No match +\= Expect no match xyz\nabc No match xyz\r\nabc @@ -6388,50 +6152,49 @@ Subject length lower bound = 5 3: a /(a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No match /(?>a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No match /(?:a|)*\d/ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 +\= Expect no match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No match /^a.b/newline=lf a\rb 0: a\x0db - ** Failers -No match +\= Expect no match a\nb No match /^a.b/newline=cr a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match a\rb No match /^a.b/newline=anycrlf a\x85b 0: a\x85b - ** Failers -No match +\= Expect no match a\rb No match /^a.b/newline=any - ** Failers -No match +\= Expect no match a\nb No match a\rb @@ -6472,8 +6235,7 @@ No match 0: a\x0cb a\x85b 0: a\x85b - ** Failers -No match +\= Expect no match a\n\rb No match @@ -6514,8 +6276,7 @@ No match 0: a\x0a\x0db a\n\r\x85\x0cb 0: a\x0a\x0d\x85\x0cb - ** Failers -No match +\= Expect no match ab No match @@ -6534,8 +6295,7 @@ No match 0: a\x0a\x0d\x0a\x0db a\n\n\r\nb 0: a\x0a\x0a\x0d\x0ab - ** Failers -No match +\= Expect no match a\n\n\n\rb No match a\r @@ -6544,8 +6304,7 @@ No match /.+foo/ afoo 0: afoo - ** Failers -No match +\= Expect no match \r\nfoo No match \nfoo @@ -6556,16 +6315,14 @@ No match 0: afoo \nfoo 0: \x0afoo - ** Failers -No match +\= Expect no match \r\nfoo No match /.+foo/newline=any afoo 0: afoo - ** Failers -No match +\= Expect no match \nfoo No match \r\nfoo @@ -6584,16 +6341,14 @@ No match 0: abc\n\rxyz 0: - ** Failers -No match +\= Expect no match abc\r\nxyz No match /^X/m XABC 0: X - ** Failers -No match +\= Expect no match XABC\=notbol No match @@ -6640,8 +6395,7 @@ No match 0: abcabc xyzabc 0: xyzabc - ** Failers -No match +\= Expect no match xyzxyz No match @@ -6650,8 +6404,7 @@ No match 0: X X\x0a X\x09X\x0b 0: X\x09X\x0b - ** Failers -No match +\= Expect no match \xa0 X\x0a No match @@ -6662,8 +6415,7 @@ No match 0: \x09 \xa0\x0a\x0b\x0c\x0d \x09\x20\xa0\x0a\x0b\x0c 0: \x09 \xa0\x0a\x0b\x0c - ** Failers -No match +\= Expect no match \x09\x20\xa0\x0a\x0b No match @@ -6683,8 +6435,7 @@ No match 0: XNNNYZ > X NYQZ 0: X NYQZ - ** Failers -No match +\= Expect no match >XYZ No match > X NY Z @@ -6697,6 +6448,7 @@ No match 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c /.+A/newline=crlf +\= Expect no match \r\nA No match @@ -6724,8 +6476,7 @@ Subject length lower bound = 3 0: a\x0ab a\r\nb 0: a\x0d\x0ab - ** Failers -No match +\= Expect no match a\x85b No match a\x0bb @@ -6760,8 +6511,7 @@ Subject length lower bound = 2 0: a\x0ab a\r\nb 0: a\x0d\x0ab - ** Failers -No match +\= Expect no match a\x85b No match a\x0bb @@ -6796,12 +6546,11 @@ Subject length lower bound = 4 0: a\x0a\x0d\x0db a\r\n\r\n\r\n\r\nb 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab - ** Failers +\= Expect no match + a\x0b\x0bb No match a\x85\x85b No match - a\x0b\0bb -No match /a\R{2,4}b/I,bsr=unicode Capturing subpattern count = 0 @@ -6817,10 +6566,9 @@ Subject length lower bound = 4 0: a\x0d\x0a\x0a\x0d\x0db a\x85\x85b 0: a\x85\x85b - a\x0b\0bb -No match - ** Failers -No match + a\x0b\x0bb + 0: a\x0b\x0bb +\= Expect no match a\r\r\r\r\rb No match @@ -6829,20 +6577,17 @@ No match 0: abc /a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match /a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match /a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames - ** Failers -No match +\= Expect no match ab No match @@ -6851,8 +6596,7 @@ No match 0: aXb a\nb 0: a\x0ab - ** Failers -No match +\= Expect no match ab No match @@ -6861,16 +6605,14 @@ No match 0: aXb a\nX\nXb 0: a\x0aX\x0aXb - ** Failers -No match +\= Expect no match ab No match /X$/dollar_endonly X 0: X - ** Failers -No match +\= Expect no match X\n No match @@ -6895,8 +6637,7 @@ No match +2 ^ ^ z +3 ^ ^ 0: xyz - ** Failers -No match +\= Expect no match abc No match abcxypqr @@ -6913,20 +6654,7 @@ No match +2 ^ ^ z +3 ^ ^ 0: xyz - ** Failers ---->** Failers - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x - +0 ^ x -No match +\= Expect no match abc --->abc +0 ^ x @@ -7019,12 +6747,14 @@ Partial match: 123999 0: 999Y /Z(*F)/ +\= Expect no match Z\=ps No match ZA\=ps No match /Z(?!)/ +\= Expect no match Z\=ps No match ZA\=ps @@ -7057,6 +6787,7 @@ Partial match: dogs /Z(*F)Q|ZXY/ Z\=ps Partial match: Z +\= Expect no match ZA\=ps No match X\=ps @@ -7125,8 +6856,7 @@ Subject length lower bound = 3 0: abc the quick xyz brown fox 0: xyz - ** Failers -No match +\= Expect no match thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd No match @@ -7138,8 +6868,7 @@ Subject length lower bound = 0 0: abc the quick xyz brown fox 0: xyz - ** Failers -No match +\= Expect no match thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd No match @@ -7185,8 +6914,7 @@ Partial match: abcde 0: BC CCD 0: CC - ** Failers -No match +\= Expect no match CAD No match @@ -7195,8 +6923,7 @@ No match 0: CC BCD 0: BC - ** Failers -No match +\= Expect no match ABCD No match CAD @@ -7209,8 +6936,6 @@ No match Failed: error -42: pattern contains an item that is not supported for DFA matching /^(?=a(*SKIP)b|ac)/ - ** Failers -No match ac Failed: error -42: pattern contains an item that is not supported for DFA matching @@ -7221,10 +6946,6 @@ Failed: error -42: pattern contains an item that is not supported for DFA matchi /^(?=a(*PRUNE)b)/ ab Failed: error -42: pattern contains an item that is not supported for DFA matching - ** Failers -No match - ac -Failed: error -42: pattern contains an item that is not supported for DFA matching /^(?(?!a(*SKIP)b))/ ac @@ -7282,12 +7003,13 @@ Partial match: abc Partial match: abc /abc\B/ - abc -No match abc\=ps Partial match: abc abc\=ph Partial match: abc +\= Expect no match + abc +No match /.+/ abc\=offset=0 @@ -7296,18 +7018,19 @@ Partial match: abc 0: bc abc\=offset=2 0: c - abc\=offset=3 -No match +\= Bad offsets abc\=offset=4 Failed: error -33: bad offset value abc\=offset=-4 ** Invalid value in 'offset=-4' +\= Expect no match + abc\=offset=3 +No match /^(?:a)++\w/ aaaab 0: aaaab - ** Failers -No match +\= Expect no match aaaa No match bbb @@ -7319,8 +7042,7 @@ No match 1: aa aaaa 0: aa - ** Failers -No match +\= Expect no match bbb No match @@ -7329,16 +7051,14 @@ No match 0: aaaab bbb 0: b - ** Failers -No match +\= Expect no match aaaa No match /^(a)++\w/ aaaab 0: aaaab - ** Failers -No match +\= Expect no match aaaa No match bbb @@ -7347,8 +7067,7 @@ No match /^(a|)++\w/ aaaab 0: aaaab - ** Failers -No match +\= Expect no match aaaa No match bbb @@ -7358,8 +7077,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -7367,8 +7085,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -7376,8 +7093,7 @@ No match abcabcabc 0: abc 0+ abcabc - ** Failers -No match +\= Expect no match xyz No match @@ -7386,8 +7102,7 @@ No match 0: xyz /(?=abc){1}xyz/ - ** Failers -No match +\= Expect no match xyz No match @@ -7923,6 +7638,7 @@ Callout (5): 'x\x00z' /(?(?!)a|b)/ bbb 0: b +\= Expect no match aaa No match diff --git a/testdata/testoutput7 b/testdata/testoutput7 index d0986df..ecd9a2d 100644 --- a/testdata/testoutput7 +++ b/testdata/testoutput7 @@ -22,8 +22,7 @@ 0: a\x{100}b a\x{100}\x{100}b 0: a\x{100}\x{100}b - *** Failers -No match +\= Expect no match ab No match @@ -34,16 +33,14 @@ No match 0: X \x{300}Xoanon 0: X - *** Failers -No match +\= Expect no match YXoanon No match /\BX/utf YXoanon 0: X - *** Failers -No match +\= Expect no match Xoanon No match +Xoanon @@ -58,16 +55,14 @@ No match 0: X FAX 0: X - *** Failers -No match +\= Expect no match Xoanon No match /X\B/utf Xoanon 0: X - *** Failers -No match +\= Expect no match X+oanon No match ZX\x{300}oanon @@ -88,8 +83,7 @@ No match 0: \x{123}\x{123}4 \x{400}\x{401}\x{402}6 0: \x{400}\x{401}\x{402}6 - *** Failers -No match +\= Expect no match d99 No match \x{123}\x{122}4 @@ -106,8 +100,7 @@ No match 0: a\x{7f}b a\x{100}b 0: a\x{100}b - *** Failers -No match +\= Expect no match a\nb No match @@ -118,8 +111,7 @@ No match 0: a\x{4000}\x{7f}yb a\x{4000}\x{100}yb 0: a\x{4000}\x{100}yb - *** Failers -No match +\= Expect no match a\x{4000}b No match ac\ncb @@ -182,8 +174,7 @@ No match 0: a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b 0: a\x{1234}\x{4321}\x{3412}b - *** Failers -No match +\= Expect no match a\x{1234}b No match ac\ncb @@ -201,8 +192,7 @@ No match 1: axxxxb a\x{1234}\x{4321}\x{3412}\x{3421}b 0: a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers -No match +\= Expect no match a\x{1234}b No match @@ -218,8 +208,7 @@ No match 1: axxxxb a\x{1234}\x{4321}\x{3412}\x{3421}b 0: a\x{1234}\x{4321}\x{3412}\x{3421}b - *** Failers -No match +\= Expect no match a\x{1234}b No match @@ -238,8 +227,7 @@ No match 0: axbxxb axxxxxbcdefghijb 0: axxxxxb - *** Failers -No match +\= Expect no match a\x{1234}b No match axxxxxxbcdefghijb @@ -260,16 +248,14 @@ No match 0: axbxxb axxxxxbcdefghijb 0: axxxxxb - *** Failers -No match +\= Expect no match a\x{1234}b No match axxxxxxbcdefghijb No match /^[a\x{c0}]/utf - *** Failers -No match +\= Expect no match \x{100} No match @@ -288,8 +274,7 @@ No match /(?:\x{100}){3}b/utf \x{100}\x{100}\x{100}b 0: \x{100}\x{100}\x{100}b - *** Failers -No match +\= Expect no match \x{100}\x{100}b No match @@ -298,8 +283,7 @@ No match 0: \x{ab} \xc2\xab 0: \x{ab} - *** Failers -No match +\= Expect no match \x00{ab} No match @@ -308,8 +292,7 @@ No match 0: X \x{256}XYZ 0: X - *** Failers -No match +\= Expect no match XYZ No match @@ -468,8 +451,7 @@ Matched, but offsets vector is too small to show all matches /\D+/utf 12abcd34 0: abcd - *** Failers - 0: *** Failers +\= Expect no match 1234 No match @@ -478,8 +460,7 @@ No match 0: abc 12ab34 0: ab - *** Failers - 0: *** +\= Expect no match 1234 No match 12a34 @@ -491,9 +472,7 @@ No match 1: ab 12ab34 0: ab - *** Failers - 0: *** - 1: ** +\= Expect no match 1234 No match 12a34 @@ -502,16 +481,13 @@ No match /\d+/utf 12abcd34 0: 12 - *** Failers -No match /\d{2,3}/utf 12abcd34 0: 12 1234abcd 0: 123 - *** Failers -No match +\= Expect no match 1.4 No match @@ -521,16 +497,14 @@ No match 1234abcd 0: 123 1: 12 - *** Failers -No match +\= Expect no match 1.4 No match /\S+/utf 12abcd34 0: 12abcd34 - *** Failers - 0: *** +\= Expect no match \ \ No match @@ -539,8 +513,7 @@ No match 0: 12a 1234abcd 0: 123 - *** Failers - 0: *** +\= Expect no match \ \ No match @@ -551,25 +524,20 @@ No match 1234abcd 0: 123 1: 12 - *** Failers - 0: *** - 1: ** +\= Expect no match \ \ No match />\s+ <34 0: > < - *** Failers -No match />\s{2,3} < ab> < - *** Failers -No match +\= Expect no match ab> < ab> < - *** Failers -No match +\= Expect no match ab> \p{Xsp}/utf >\x{1680}\x{2028}\x{0b} 0: >\x{1680} - ** Failers -No match +\= Expect no match \x{0b} No match @@ -2952,8 +2769,7 @@ No match 0: >\x{1680} >\x{a0} 0: >\x{a0} - ** Failers -No match +\= Expect no match \x{0b} No match @@ -3007,8 +2823,7 @@ No match 0: \x{10a7} _ABC 0: _ - ** Failers -No match +\= Expect no match [] No match @@ -3037,8 +2852,7 @@ No match 0: \x{10a7} _ABC 0: _ - ** Failers -No match +\= Expect no match [] No match @@ -3065,8 +2879,7 @@ No match /\b...\B/utf abc_ 0: abc - ** Failers - 0: Fai +\= Expect no match \x{37e}abc\x{376} No match \x{37e}\x{376}\x{371}\x{393}\x{394} @@ -3171,9 +2984,7 @@ Partial match: AA \x{1b04}\x{1b04}X 0: \x{1b04}\x{1b04} 0+ X - *These match up to the roman letters - 0: * - 0+ These match up to the roman letters +\= These match up to the roman letters \x{1111}\x{1111}L,L 0: \x{1111}\x{1111} 0+ L,L @@ -3204,9 +3015,7 @@ Partial match: AA \x{ad89}\x{11fe}\x{11fe}LVT, T, T 0: \x{ad89}\x{11fe}\x{11fe} 0+ LVT, T, T - *These match just the first codepoint (invalid sequence) - 0: * - 0+ These match just the first codepoint (invalid sequence) +\= These match just the first codepoint (invalid sequence) \x{1111}\x{11fe}L, T 0: \x{1111} 0+ \x{11fe}L, T @@ -3252,9 +3061,7 @@ Partial match: AA \x{11fe}\x{ad89}T, LVT 0: \x{11fe} 0+ \x{ad89}T, LVT - *Test extend and spacing mark - 0: * - 0+ Test extend and spacing mark +\= Test extend and spacing mark \x{1111}\x{ae4c}\x{0711}L, LV, extend 0: \x{1111}\x{ae4c}\x{711} 0+ L, LV, extend @@ -3264,9 +3071,7 @@ Partial match: AA \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark 0: \x{1111}\x{ae4c}\x{1b04}\x{711}\x{1b04} 0+ L, LV, spacing mark, extend, spacing mark - *Test CR, LF, and control - 0: * - 0+ Test CR, LF, and control +\= Test CR, LF, and control \x0d\x{0711}CR, extend 0: \x{0d} 0+ \x{711}CR, extend @@ -3285,9 +3090,7 @@ Partial match: AA \x09\x{1b04}Control, spacingmark 0: \x{09} 0+ \x{1b04}Control, spacingmark - *There are no Prepend characters, so we can't test Prepend, CR - 0: * - 0+ There are no Prepend characters, so we can't test Prepend, CR +\= There are no Prepend characters, so we can't test Prepend, CR /^(?>\X{2})X/utf,aftertext \x{1111}\x{ae4c}\x{1111}\x{ae4c}X @@ -3367,7 +3170,6 @@ Partial match: AA \x{00c5}\x{00e5}\x{212b} 0: \x{c5}\x{e5}\x{212b} - /\x{01c4}+/i,utf \x{01c4}\x{01c5}\x{01c6} 0: \x{1c4}\x{1c5}\x{1c6} @@ -3380,7 +3182,6 @@ Partial match: AA \x{01c4}\x{01c5}\x{01c6} 0: \x{1c4}\x{1c5}\x{1c6} - /\x{01c7}+/i,utf \x{01c7}\x{01c8}\x{01c9} 0: \x{1c7}\x{1c8}\x{1c9} @@ -3406,7 +3207,6 @@ Partial match: AA \x{01ca}\x{01cb}\x{01cc} 0: \x{1ca}\x{1cb}\x{1cc} - /\x{01f1}+/i,utf \x{01f1}\x{01f2}\x{01f3} 0: \x{1f1}\x{1f2}\x{1f3} @@ -3419,7 +3219,6 @@ Partial match: AA \x{01f1}\x{01f2}\x{01f3} 0: \x{1f1}\x{1f2}\x{1f3} - /\x{0345}+/i,utf \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} @@ -3436,7 +3235,6 @@ Partial match: AA \x{0345}\x{0399}\x{03b9}\x{1fbe} 0: \x{345}\x{399}\x{3b9}\x{1fbe} - /\x{0392}+/i,utf \x{0392}\x{03b2}\x{03d0} 0: \x{392}\x{3b2}\x{3d0} @@ -3462,7 +3260,6 @@ Partial match: AA \x{0395}\x{03b5}\x{03f5} 0: \x{395}\x{3b5}\x{3f5} - /\x{0398}+/i,utf \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} @@ -3478,7 +3275,6 @@ Partial match: AA /\x{03f4}+/i,utf \x{0398}\x{03b8}\x{03d1}\x{03f4} 0: \x{398}\x{3b8}\x{3d1}\x{3f4} - /\x{039a}+/i,utf \x{039a}\x{03ba}\x{03f0} @@ -3492,7 +3288,6 @@ Partial match: AA \x{039a}\x{03ba}\x{03f0} 0: \x{39a}\x{3ba}\x{3f0} - /\x{03a0}+/i,utf \x{03a0}\x{03c0}\x{03d6} 0: \x{3a0}\x{3c0}\x{3d6} @@ -3505,7 +3300,6 @@ Partial match: AA \x{03a0}\x{03c0}\x{03d6} 0: \x{3a0}\x{3c0}\x{3d6} - /\x{03a1}+/i,utf \x{03a1}\x{03c1}\x{03f1} 0: \x{3a1}\x{3c1}\x{3f1} @@ -3518,7 +3312,6 @@ Partial match: AA \x{03a1}\x{03c1}\x{03f1} 0: \x{3a1}\x{3c1}\x{3f1} - /\x{03a3}+/i,utf \x{03A3}\x{03C2}\x{03C3} 0: \x{3a3}\x{3c2}\x{3c3} @@ -3530,7 +3323,6 @@ Partial match: AA /\x{03c3}+/i,utf \x{03A3}\x{03C2}\x{03C3} 0: \x{3a3}\x{3c2}\x{3c3} - /\x{03a6}+/i,utf \x{03a6}\x{03c6}\x{03d5} @@ -3544,7 +3336,6 @@ Partial match: AA \x{03a6}\x{03c6}\x{03d5} 0: \x{3a6}\x{3c6}\x{3d5} - /\x{03c9}+/i,utf \x{03c9}\x{03a9}\x{2126} 0: \x{3c9}\x{3a9}\x{2126} @@ -3557,7 +3348,6 @@ Partial match: AA \x{03c9}\x{03a9}\x{2126} 0: \x{3c9}\x{3a9}\x{2126} - /\x{1e60}+/i,utf \x{1e60}\x{1e61}\x{1e9b} 0: \x{1e60}\x{1e61}\x{1e9b} @@ -3570,7 +3360,6 @@ Partial match: AA \x{1e60}\x{1e61}\x{1e9b} 0: \x{1e60}\x{1e61}\x{1e9b} - /\x{1e9e}+/i,utf \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} @@ -3579,7 +3368,6 @@ Partial match: AA \x{1e9e}\x{00df} 0: \x{1e9e}\x{df} - /\x{1f88}+/i,utf \x{1f88}\x{1f80} 0: \x{1f88}\x{1f80} @@ -3600,7 +3388,6 @@ Partial match: AA \x{004b}\x{006b}\x{212a} 0: Kk\x{212a} - /\x{0053}+/i,utf \x{0053}\x{0073}\x{017f} 0: Ss\x{17f} @@ -3614,24 +3401,29 @@ Partial match: AA 0: Ss\x{17f} /ist/i,utf +\= Expect no match ikt No match /is+t/i,utf iSs\x{17f}t 0: iSs\x{17f}t +\= Expect no match ikt No match /is+?t/i,utf +\= Expect no match ikt No match /is?t/i,utf +\= Expect no match ikt No match /is{2}t/i,utf +\= Expect no match iskt No match @@ -3644,16 +3436,14 @@ No match 0: ` \x{1234}abc 0: \x{1234} - ** Failers -No match +\= Expect no match abc No match /^\p{Xuc}+/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match @@ -3665,32 +3455,28 @@ No match 3: $@` 4: $@ 5: $ - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}+?\*/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000}* - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}++/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match /^\p{Xuc}{3,5}/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234} - ** Failers -No match +\= Expect no match \x{9f} No match @@ -3699,32 +3485,28 @@ No match 0: $@`\x{a0}\x{1234} 1: $@`\x{a0} 2: $@` - ** Failers -No match +\= Expect no match \x{9f} No match /^[\p{Xuc}]/utf $@`\x{a0}\x{1234}\x{e000}** 0: $ - ** Failers -No match +\= Expect no match \x{9f} No match /^[\p{Xuc}]+/utf $@`\x{a0}\x{1234}\x{e000}** 0: $@`\x{a0}\x{1234}\x{e000} - ** Failers -No match +\= Expect no match \x{9f} No match /^\P{Xuc}/utf abc 0: a - ** Failers - 0: * +\= Expect no match $abc No match @abc @@ -3737,8 +3519,7 @@ No match /^[\P{Xuc}]/utf abc 0: a - ** Failers - 0: * +\= Expect no match $abc No match @abc diff --git a/testdata/testoutput9 b/testdata/testoutput9 index e198d36..7de83f2 100644 --- a/testdata/testoutput9 +++ b/testdata/testoutput9 @@ -9,8 +9,7 @@ 0: aXb a\nb 0: a\x0ab - ** Failers (too big char) -No match +\= Expect no match and error message (too big char) A\x{123}B ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. ** Truncation will probably give the wrong result.