summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-09-18 16:31:30 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-09-18 16:31:30 +0000
commit3c2c4493cc3b12dddd2493b465f0ce50e3f77b5a (patch)
tree00da02b321326bc57645afdd9dbb665389cc441c /testdata
parent7631cfc720ba913fe3ffa1f23fb747d91d1d7d48 (diff)
downloadpcre2-3c2c4493cc3b12dddd2493b465f0ce50e3f77b5a.tar.gz
Implement callouts from pcre2_substitute().
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1012 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r--testdata/testinput105
-rw-r--r--testdata/testinput125
-rw-r--r--testdata/testinput23
-rw-r--r--testdata/testoutput1010
-rw-r--r--testdata/testoutput12-1610
-rw-r--r--testdata/testoutput12-3210
-rw-r--r--testdata/testoutput26
7 files changed, 49 insertions, 0 deletions
diff --git a/testdata/testinput10 b/testdata/testinput10
index 93d2560..0e19681 100644
--- a/testdata/testinput10
+++ b/testdata/testinput10
@@ -475,5 +475,10 @@
\x{100}
\= Expect no match
aaa
+
+# Offsets are different in 8-bit mode.
+
+/(?<=abc)(|def)/g,utf,replace=<$0>,substitute_callout
+ 123abcáyzabcdef789abcሴqr
# End of testinput10
diff --git a/testdata/testinput12 b/testdata/testinput12
index b0ab909..6a996aa 100644
--- a/testdata/testinput12
+++ b/testdata/testinput12
@@ -381,5 +381,10 @@
\x{100}
\= Expect no match
aaa
+
+# Offsets are different in 8-bit mode.
+
+/(?<=abc)(|def)/g,utf,replace=<$0>,substitute_callout
+ 123abcáyzabcdef789abcሴqr
# End of testinput12
diff --git a/testdata/testinput2 b/testdata/testinput2
index 0d380f5..39323a6 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -5514,4 +5514,7 @@ a)"xI
abcdef\=ovector=4
abxyz\=ovector=4
+/a(b)c|xyz/g,replace=<$0>,substitute_callout
+ abcdefabcpqr
+
# End of testinput2
diff --git a/testdata/testoutput10 b/testdata/testoutput10
index 9660fc5..5a28da9 100644
--- a/testdata/testoutput10
+++ b/testdata/testoutput10
@@ -1625,5 +1625,15 @@ Subject length lower bound = 1
\= Expect no match
aaa
No match
+
+# Offsets are different in 8-bit mode.
+
+/(?<=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
+ 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# End of testinput10
diff --git a/testdata/testoutput12-16 b/testdata/testoutput12-16
index 52dbe74..2fc9261 100644
--- a/testdata/testoutput12-16
+++ b/testdata/testoutput12-16
@@ -1470,5 +1470,15 @@ Subject length lower bound = 1
\= Expect no match
aaa
No match
+
+# Offsets are different in 8-bit mode.
+
+/(?<=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
+ 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# End of testinput12
diff --git a/testdata/testoutput12-32 b/testdata/testoutput12-32
index 38ff92d..efb7cc6 100644
--- a/testdata/testoutput12-32
+++ b/testdata/testoutput12-32
@@ -1467,5 +1467,15 @@ Subject length lower bound = 1
\= Expect no match
aaa
No match
+
+# Offsets are different in 8-bit mode.
+
+/(?<=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
+ 4: 123abc<>\x{e1}yzabc<><def>789abc<>\x{1234}qr
# End of testinput12
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 52c42a9..0a8db35 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -16795,6 +16795,12 @@ Subject length lower bound = 1
2: <unchanged>
3: <unchanged>
+/a(b)c|xyz/g,replace=<$0>,substitute_callout
+ abcdefabcpqr
+Old 0 3 New 0 5
+Old 6 9 New 8 13
+ 2: <abc>def<abc>pqr
+
# End of testinput2
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data