From 50ffe28edeacc750dcfa3f1d3c0c89f003686860 Mon Sep 17 00:00:00 2001 From: ph10 Date: Thu, 26 Dec 2019 14:53:24 +0000 Subject: Implement PCRE2_SUBSTITUTE_LITERAL. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1194 6239d852-aaf2-0410-a92c-79f79f948069 --- testdata/testinput2 | 7 +++++++ testdata/testoutput2 | 10 ++++++++++ 2 files changed, 17 insertions(+) (limited to 'testdata') 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 -- cgit v1.2.1