summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-12-26 14:53:24 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-12-26 14:53:24 +0000
commit50ffe28edeacc750dcfa3f1d3c0c89f003686860 (patch)
treed9bd1a03bf5734b32f209b4c4d62486d973b8ef3 /testdata
parentea9d40470130e4e235717be247c5b3e6e79f12ba (diff)
downloadpcre2-50ffe28edeacc750dcfa3f1d3c0c89f003686860.tar.gz
Implement PCRE2_SUBSTITUTE_LITERAL.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1194 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r--testdata/testinput27
-rw-r--r--testdata/testoutput210
2 files changed, 17 insertions, 0 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2
index b700d9e..b8f27c5 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -4583,6 +4583,12 @@ B)x/alt_verbnames,mark
/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended
abcd
+/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended,substitute_literal
+ >>abcd<<
+
+/abcd/g,replace=\$1$2\,substitute_literal
+ XabcdYabcdZ
+
/a(bc)(DE)/replace=a\u$1\U$1\E$1\l$2\L$2\Eab\Uab\LYZ\EDone,substitute_extended
abcDE
@@ -4594,6 +4600,7 @@ B)x/alt_verbnames,mark
ac
ab\=replace=${1:+$1\:$1:$2}
ac\=replace=${1:+$1\:$1:$2}
+ >>ac<<\=replace=${1:+$1\:$1:$2},substitute_literal
/a(?:(b)|(c))/substitute_extended,replace=X${1:-1:-1}X${2:-2:-2}
ab
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index df2f230..0720834 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -14778,6 +14778,14 @@ No match
abcd
1: w\x0dx\x82y\xdbz(12\$34$$\x345$)
+/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended,substitute_literal
+ >>abcd<<
+ 1: >>w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$)<<
+
+/abcd/g,replace=\$1$2\,substitute_literal
+ XabcdYabcdZ
+ 2: X\$1$2\Y\$1$2\Z
+
/a(bc)(DE)/replace=a\u$1\U$1\E$1\l$2\L$2\Eab\Uab\LYZ\EDone,substitute_extended
abcDE
1: aBcBCbcdEdeabAByzDone
@@ -14795,6 +14803,8 @@ Failed: error -57 at offset 4 in replacement: bad escape sequence in replacement
1: b:b
ac\=replace=${1:+$1\:$1:$2}
1: c
+ >>ac<<\=replace=${1:+$1\:$1:$2},substitute_literal
+ 1: >>${1:+$1\:$1:$2}<<
/a(?:(b)|(c))/substitute_extended,replace=X${1:-1:-1}X${2:-2:-2}
ab