diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-06-11 13:38:38 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-06-11 13:38:38 +0000 |
commit | 6cd094c7b56880c59c20914f08f739d56a859fa6 (patch) | |
tree | 00687cc32d070372a733226e912629b16f1fe7be /testdata | |
parent | 9d95f8c10848c50c0434d058070c93b4206df01b (diff) | |
download | pcre-6cd094c7b56880c59c20914f08f739d56a859fa6.tar.gz |
Added the Perl 5.10 (?| "branch reset" feature.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@175 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput2 | 25 | ||||
-rw-r--r-- | testdata/testinput7 | 18 | ||||
-rw-r--r-- | testdata/testoutput2 | 117 | ||||
-rw-r--r-- | testdata/testoutput7 | 28 |
4 files changed, 188 insertions, 0 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2 index 8b027c7..357b1a9 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -2215,4 +2215,29 @@ a random value. /Ix /\g{A/ +/(?|(abc)|(xyz))/BZ + >abc< + >xyz< + +/(x)(?|(abc)|(xyz))(x)/BZ + xabcx + xxyzx + +/(x)(?|(abc)(pqr)|(xyz))(x)/BZ + xabcpqrx + xxyzx + +/(?|(abc)|(xyz))\1/ + abcabc + xyzxyz + ** Failers + abcxyz + xyzabc + +/(?|(abc)|(xyz))(?1)/ + abcabc + xyzabc + ** Failers + xyzxyz + / End of testinput2 / diff --git a/testdata/testinput7 b/testdata/testinput7 index 5c2dd6f..55ed629 100644 --- a/testdata/testinput7 +++ b/testdata/testinput7 @@ -4249,4 +4249,22 @@ /(?m)$/<any>g+ abc\r\n\r\n +/(?|(abc)|(xyz))/ + >abc< + >xyz< + +/(x)(?|(abc)|(xyz))(x)/ + xabcx + xxyzx + +/(x)(?|(abc)(pqr)|(xyz))(x)/ + xabcpqrx + xxyzx + +/(?|(abc)|(xyz))(?1)/ + abcabc + xyzabc + ** Failers + xyzxyz + / End of testinput7 / diff --git a/testdata/testoutput2 b/testdata/testoutput2 index d51f0c8..d975fa1 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -8357,4 +8357,121 @@ No match /\g{A/ Failed: syntax error in subpattern name (missing terminator) at offset 4 +/(?|(abc)|(xyz))/BZ +------------------------------------------------------------------ + Bra 0 + Bra 0 + Bra 1 + abc + Ket + Alt + Bra 1 + xyz + Ket + Ket + Ket + End +------------------------------------------------------------------ + >abc< + 0: abc + 1: abc + >xyz< + 0: xyz + 1: xyz + +/(x)(?|(abc)|(xyz))(x)/BZ +------------------------------------------------------------------ + Bra 0 + Bra 1 + x + Ket + Bra 0 + Bra 2 + abc + Ket + Alt + Bra 2 + xyz + Ket + Ket + Bra 3 + x + Ket + Ket + End +------------------------------------------------------------------ + xabcx + 0: xabcx + 1: x + 2: abc + 3: x + xxyzx + 0: xxyzx + 1: x + 2: xyz + 3: x + +/(x)(?|(abc)(pqr)|(xyz))(x)/BZ +------------------------------------------------------------------ + Bra 0 + Bra 1 + x + Ket + Bra 0 + Bra 2 + abc + Ket + Bra 3 + pqr + Ket + Alt + Bra 2 + xyz + Ket + Ket + Bra 4 + x + Ket + Ket + End +------------------------------------------------------------------ + xabcpqrx + 0: xabcpqrx + 1: x + 2: abc + 3: pqr + 4: x + xxyzx + 0: xxyzx + 1: x + 2: xyz + 3: <unset> + 4: x + +/(?|(abc)|(xyz))\1/ + abcabc + 0: abcabc + 1: abc + xyzxyz + 0: xyzxyz + 1: xyz + ** Failers +No match + abcxyz +No match + xyzabc +No match + +/(?|(abc)|(xyz))(?1)/ + abcabc + 0: abcabc + 1: abc + xyzabc + 0: xyzabc + 1: xyz + ** Failers +No match + xyzxyz +No match + / End of testinput2 / diff --git a/testdata/testoutput7 b/testdata/testoutput7 index 6860b66..9127526 100644 --- a/testdata/testoutput7 +++ b/testdata/testoutput7 @@ -6990,4 +6990,32 @@ No match 0: 0+ +/(?|(abc)|(xyz))/ + >abc< + 0: abc + >xyz< + 0: xyz + +/(x)(?|(abc)|(xyz))(x)/ + xabcx + 0: xabcx + xxyzx + 0: xxyzx + +/(x)(?|(abc)(pqr)|(xyz))(x)/ + xabcpqrx + 0: xabcpqrx + xxyzx + 0: xxyzx + +/(?|(abc)|(xyz))(?1)/ + abcabc + 0: abcabc + xyzabc + 0: xyzabc + ** Failers +No match + xyzxyz +No match + / End of testinput7 / |