diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-11-09 09:17:20 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-11-09 09:17:20 +0000 |
commit | 25ab1d4dc4c7d82c3431b37d52bc924c5362721d (patch) | |
tree | 709f82e266b55de54bf7cd84dffce9916ad97a9f /testdata | |
parent | 92700d11a21ac14016162084d73fe476f7a828e4 (diff) | |
download | pcre-25ab1d4dc4c7d82c3431b37d52bc924c5362721d.tar.gz |
Require group names to start with a non-digit.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1394 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput2 | 43 | ||||
-rw-r--r-- | testdata/testoutput11-16 | 4 | ||||
-rw-r--r-- | testdata/testoutput11-32 | 4 | ||||
-rw-r--r-- | testdata/testoutput11-8 | 4 | ||||
-rw-r--r-- | testdata/testoutput2 | 70 |
5 files changed, 103 insertions, 22 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2 index 021c1e8..be8cdaa 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -1945,10 +1945,7 @@ a random value. /Ix /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x abcabc1Xabc2XabcXabcabc -/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - -/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - abcabc1Xabc2XabcXabcabc +/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x /^(?(DEFINE) abc | xyz ) /x @@ -2065,7 +2062,7 @@ a random value. /Ix /^(a)\g{3/ -/^(a)\g{4a}/ +/^(a)\g{aa}/ /^a.b/<lf> a\rb @@ -3997,4 +3994,40 @@ backtracking verbs. --/ /[a-\d]+/ +/(?<0abc>xx)/ + +/(?&1abc)xx(?<1abc>y)/ + +/(?<ab-cd>xx)/ + +/(?'0abc'xx)/ + +/(?P<0abc>xx)/ + +/\k<5ghj>/ + +/\k'5ghj'/ + +/\k{2fgh}/ + +/(?P=8yuki)/ + +/\g{4df}/ + +/(?&1abc)xx(?<1abc>y)/ + +/(?P>1abc)xx(?<1abc>y)/ + +/\g'3gh'/ + +/\g<5fg>/ + +/(?(<4gh>)abc)/ + +/(?('4gh')abc)/ + +/(?(4gh)abc)/ + +/(?(R&6yh)abc)/ + /-- End of testinput2 --/ diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16 index 18cbaef..f1ad888 100644 --- a/testdata/testoutput11-16 +++ b/testdata/testoutput11-16 @@ -535,7 +535,7 @@ Memory allocation (code space): 24 ------------------------------------------------------------------ /( ( (?(1)0|) )* )/xBM -Memory allocation (code space): 54 +Memory allocation (code space): 52 ------------------------------------------------------------------ 0 23 Bra 2 19 CBra 1 @@ -553,7 +553,7 @@ Memory allocation (code space): 54 ------------------------------------------------------------------ /( (?(1)0|)* )/xBM -Memory allocation (code space): 44 +Memory allocation (code space): 42 ------------------------------------------------------------------ 0 18 Bra 2 14 CBra 1 diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32 index 3682288..266e55d 100644 --- a/testdata/testoutput11-32 +++ b/testdata/testoutput11-32 @@ -535,7 +535,7 @@ Memory allocation (code space): 48 ------------------------------------------------------------------ /( ( (?(1)0|) )* )/xBM -Memory allocation (code space): 108 +Memory allocation (code space): 104 ------------------------------------------------------------------ 0 23 Bra 2 19 CBra 1 @@ -553,7 +553,7 @@ Memory allocation (code space): 108 ------------------------------------------------------------------ /( (?(1)0|)* )/xBM -Memory allocation (code space): 88 +Memory allocation (code space): 84 ------------------------------------------------------------------ 0 18 Bra 2 14 CBra 1 diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8 index b3a7781..d4a2133 100644 --- a/testdata/testoutput11-8 +++ b/testdata/testoutput11-8 @@ -535,7 +535,7 @@ Memory allocation (code space): 17 ------------------------------------------------------------------ /( ( (?(1)0|) )* )/xBM -Memory allocation (code space): 40 +Memory allocation (code space): 38 ------------------------------------------------------------------ 0 34 Bra 3 28 CBra 1 @@ -553,7 +553,7 @@ Memory allocation (code space): 40 ------------------------------------------------------------------ /( (?(1)0|)* )/xBM -Memory allocation (code space): 32 +Memory allocation (code space): 30 ------------------------------------------------------------------ 0 26 Bra 3 20 CBra 1 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 3069525..ba59197 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -549,10 +549,10 @@ Failed: conditional group contains more than two branches at offset 13 Failed: conditional group contains more than two branches at offset 12 /(?(1a)/ -Failed: missing ) at offset 6 +Failed: malformed number or name after (?( at offset 4 /(?(1a))/ -Failed: reference to non-existent subpattern at offset 6 +Failed: malformed number or name after (?( at offset 4 /(?(?i))/ Failed: assertion expected after (?( at offset 3 @@ -6359,7 +6359,7 @@ Need char = 'X' 1: X /(?:(?(2y)a|b)(X))+/I -Failed: reference to non-existent subpattern at offset 9 +Failed: malformed number or name after (?( at offset 7 /(?:(?(ZA)a|b)(?P<ZZ>X))+/I Failed: reference to non-existent subpattern at offset 9 @@ -7866,15 +7866,9 @@ Failed: reference to non-existent subpattern at offset 7 1: abcabc1Xabc2XabcX 2: abcabc1Xabc2XabcX -/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x +/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x Failed: reference to non-existent subpattern at offset 29 -/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x - abcabc1Xabc2XabcXabcabc - 0: abcabc1Xabc2XabcX - 1: abcabc1Xabc2XabcX - 2: abcabc1Xabc2XabcX - /^(?(DEFINE) abc | xyz ) /x Failed: DEFINE group contains more than one branch at offset 22 @@ -8098,7 +8092,7 @@ Failed: a numbered reference must not be zero at offset 8 /^(a)\g{3/ Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8 -/^(a)\g{4a}/ +/^(a)\g{aa}/ Failed: reference to non-existent subpattern at offset 9 /^a.b/<lf> @@ -14032,4 +14026,58 @@ Failed: range out of order in character class at offset 3 /[a-\d]+/ Failed: invalid range in character class at offset 4 +/(?<0abc>xx)/ +Failed: group name must start with a non-digit at offset 3 + +/(?&1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 3 + +/(?<ab-cd>xx)/ +Failed: syntax error in subpattern name (missing terminator) at offset 5 + +/(?'0abc'xx)/ +Failed: group name must start with a non-digit at offset 3 + +/(?P<0abc>xx)/ +Failed: group name must start with a non-digit at offset 4 + +/\k<5ghj>/ +Failed: group name must start with a non-digit at offset 3 + +/\k'5ghj'/ +Failed: group name must start with a non-digit at offset 3 + +/\k{2fgh}/ +Failed: group name must start with a non-digit at offset 3 + +/(?P=8yuki)/ +Failed: group name must start with a non-digit at offset 4 + +/\g{4df}/ +Failed: group name must start with a non-digit at offset 3 + +/(?&1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 3 + +/(?P>1abc)xx(?<1abc>y)/ +Failed: group name must start with a non-digit at offset 4 + +/\g'3gh'/ +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 + +/\g<5fg>/ +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 + +/(?(<4gh>)abc)/ +Failed: group name must start with a non-digit at offset 4 + +/(?('4gh')abc)/ +Failed: group name must start with a non-digit at offset 4 + +/(?(4gh)abc)/ +Failed: malformed number or name after (?( at offset 4 + +/(?(R&6yh)abc)/ +Failed: group name must start with a non-digit at offset 5 + /-- End of testinput2 --/ |