summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-11-12 16:02:01 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-11-12 16:02:01 +0000
commit30dcfda7537de8d0b95200c533cf7aad792d1d9d (patch)
tree4d130314d7b71922a45258e9b61151528ee2ae1f /testdata
parentf1dd223469f0ba82f9070a8c6e70c8acabbb1c60 (diff)
downloadpcre2-30dcfda7537de8d0b95200c533cf7aad792d1d9d.tar.gz
Upgrade the as yet unreleased substitute callout facility.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1039 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r--testdata/testinput215
-rw-r--r--testdata/testoutput108
-rw-r--r--testdata/testoutput12-168
-rw-r--r--testdata/testoutput12-328
-rw-r--r--testdata/testoutput247
5 files changed, 72 insertions, 14 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2
index 565ce18..c9a8b9f 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -5516,6 +5516,21 @@ a)"xI
/a(b)c|xyz/g,replace=<$0>,substitute_callout
abcdefabcpqr
+ abxyzpqrabcxyz
+ 12abc34xyz99abc55\=substitute_stop=2
+ 12abc34xyz99abc55\=substitute_skip=1
+ 12abc34xyz99abc55\=substitute_skip=2
+
+/a(b)c|xyz/g,replace=<$0>
+ abcdefabcpqr
+ abxyzpqrabcxyz
+ 12abc34xyz\=substitute_stop=2
+ 12abc34xyz\=substitute_skip=1
+
+/a(b)c|xyz/replace=<$0>
+ abcdefabcpqr
+ 12abc34xyz\=substitute_skip=1
+ 12abc34xyz\=substitute_stop=1
/abc\rdef/
abc\ndef
diff --git a/testdata/testoutput10 b/testdata/testoutput10
index 5a28da9..97757de 100644
--- a/testdata/testoutput10
+++ b/testdata/testoutput10
@@ -1630,10 +1630,10 @@ No match
/(?<=abc)(|def)/g,utf,replace=<$0>,substitute_callout
123abcáyzabcdef789abcሴqr
-Old 6 6 New 6 8
-Old 13 13 New 15 17
-Old 13 16 New 17 22
-Old 22 22 New 28 30
+ 1(2) Old 6 6 "" New 6 8 "<>"
+ 2(2) Old 13 13 "" New 15 17 "<>"
+ 3(2) Old 13 16 "def" New 17 22 "<def>"
+ 4(2) Old 22 22 "" New 28 30 "<>"
4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# End of testinput10
diff --git a/testdata/testoutput12-16 b/testdata/testoutput12-16
index 72dde81..a5b5b75 100644
--- a/testdata/testoutput12-16
+++ b/testdata/testoutput12-16
@@ -1475,10 +1475,10 @@ No match
/(?<=abc)(|def)/g,utf,replace=<$0>,substitute_callout
123abcáyzabcdef789abcሴqr
-Old 6 6 New 6 8
-Old 12 12 New 14 16
-Old 12 15 New 16 21
-Old 21 21 New 27 29
+ 1(2) Old 6 6 "" New 6 8 "<>"
+ 2(2) Old 12 12 "" New 14 16 "<>"
+ 3(2) Old 12 15 "def" New 16 21 "<def>"
+ 4(2) Old 21 21 "" New 27 29 "<>"
4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# A few script run tests in non-UTF mode (but they need Unicode support)
diff --git a/testdata/testoutput12-32 b/testdata/testoutput12-32
index d2c59e5..ac51be9 100644
--- a/testdata/testoutput12-32
+++ b/testdata/testoutput12-32
@@ -1472,10 +1472,10 @@ No match
/(?<=abc)(|def)/g,utf,replace=<$0>,substitute_callout
123abcáyzabcdef789abcሴqr
-Old 6 6 New 6 8
-Old 12 12 New 14 16
-Old 12 15 New 16 21
-Old 21 21 New 27 29
+ 1(2) Old 6 6 "" New 6 8 "<>"
+ 2(2) Old 12 12 "" New 14 16 "<>"
+ 3(2) Old 12 15 "def" New 16 21 "<def>"
+ 4(2) Old 21 21 "" New 27 29 "<>"
4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# A few script run tests in non-UTF mode (but they need Unicode support)
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 9ecbc9f..833ccbd 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -16797,9 +16797,52 @@ Subject length lower bound = 1
/a(b)c|xyz/g,replace=<$0>,substitute_callout
abcdefabcpqr
-Old 0 3 New 0 5
-Old 6 9 New 8 13
+ 1(2) Old 0 3 "abc" New 0 5 "<abc>"
+ 2(2) Old 6 9 "abc" New 8 13 "<abc>"
2: <abc>def<abc>pqr
+ abxyzpqrabcxyz
+ 1(1) Old 2 5 "xyz" New 2 7 "<xyz>"
+ 2(2) Old 8 11 "abc" New 10 15 "<abc>"
+ 3(1) Old 11 14 "xyz" New 15 20 "<xyz>"
+ 3: ab<xyz>pqr<abc><xyz>
+ 12abc34xyz99abc55\=substitute_stop=2
+ 1(2) Old 2 5 "abc" New 2 7 "<abc>"
+ 2(1) Old 7 10 "xyz" New 9 14 "<xyz> STOPPED"
+ 2: 12<abc>34xyz99abc55
+ 12abc34xyz99abc55\=substitute_skip=1
+ 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED"
+ 2(1) Old 7 10 "xyz" New 7 12 "<xyz>"
+ 3(2) Old 12 15 "abc" New 14 19 "<abc>"
+ 3: 12abc34<xyz>99<abc>55
+ 12abc34xyz99abc55\=substitute_skip=2
+ 1(2) Old 2 5 "abc" New 2 7 "<abc>"
+ 2(1) Old 7 10 "xyz" New 9 14 "<xyz> SKIPPED"
+ 3(2) Old 12 15 "abc" New 14 19 "<abc>"
+ 3: 12<abc>34xyz99<abc>55
+
+/a(b)c|xyz/g,replace=<$0>
+ abcdefabcpqr
+ 2: <abc>def<abc>pqr
+ abxyzpqrabcxyz
+ 3: ab<xyz>pqr<abc><xyz>
+ 12abc34xyz\=substitute_stop=2
+ 1(2) Old 2 5 "abc" New 2 7 "<abc>"
+ 2(1) Old 7 10 "xyz" New 9 14 "<xyz> STOPPED"
+ 2: 12<abc>34xyz
+ 12abc34xyz\=substitute_skip=1
+ 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED"
+ 2(1) Old 7 10 "xyz" New 7 12 "<xyz>"
+ 2: 12abc34<xyz>
+
+/a(b)c|xyz/replace=<$0>
+ abcdefabcpqr
+ 1: <abc>defabcpqr
+ 12abc34xyz\=substitute_skip=1
+ 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED"
+ 1: 12abc34xyz
+ 12abc34xyz\=substitute_stop=1
+ 1(2) Old 2 5 "abc" New 2 7 "<abc> STOPPED"
+ 1: 12abc34xyz
/abc\rdef/
abc\ndef