diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-01 18:10:15 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-01 18:10:15 +0000 |
commit | 0b413ddb2bbcf992322ac8168bc1c180b5e0b096 (patch) | |
tree | fa3f434f0cd8a77ca19bf8b269544380abb4ca88 /testdata | |
parent | d7dc5d608f73e8fe3e6463806604fb29ce06fb3d (diff) | |
download | pcre2-0b413ddb2bbcf992322ac8168bc1c180b5e0b096.tar.gz |
Implement PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@816 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput2 | 13 | ||||
-rw-r--r-- | testdata/testinput5 | 9 | ||||
-rw-r--r-- | testdata/testoutput2 | 27 | ||||
-rw-r--r-- | testdata/testoutput5 | 21 |
4 files changed, 68 insertions, 2 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2 index 00017df..20d526c 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -5279,4 +5279,17 @@ a)"xI /(a)(?-n:(b))(c)/nB +# ---------------------------------------------------------------------- +# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option. + +/\j\x{z}\o{82}\L\uabcd\u\U\g{\g/B,\bad_escape_is_literal + +/\N{\c/B,bad_escape_is_literal + +/[\j\x{z}\o\gA-\Nb-\g]/B,bad_escape_is_literal + +/[Q-\N]/B,bad_escape_is_literal + +# ---------------------------------------------------------------------- + # End of testinput2 diff --git a/testdata/testinput5 b/testdata/testinput5 index 0e8bf9f..dd39bb0 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -2015,6 +2015,13 @@ \= Expect no match X$ -# --------------------------------------------------------------------------- +# ---------------------------------------------------------------------- +# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option. + +/\x{d800}/B,utf,bad_escape_is_literal + +/\ud800/B,utf,alt_bsux,bad_escape_is_literal + +# ---------------------------------------------------------------------- # End of testinput5 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 17a771e..4a9dea9 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -15988,6 +15988,33 @@ Subject length lower bound = 1 End ------------------------------------------------------------------ +# ---------------------------------------------------------------------- +# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option. + +/\j\x{z}\o{82}\L\uabcd\u\U\g{\g/B,\bad_escape_is_literal +** Unrecognized modifier '\' in '\bad_escape_is_literal' + +/\N{\c/B,bad_escape_is_literal +------------------------------------------------------------------ + Bra + N{c + Ket + End +------------------------------------------------------------------ + +/[\j\x{z}\o\gA-\Nb-\g]/B,bad_escape_is_literal +------------------------------------------------------------------ + Bra + [A-Nb-gjoxz{}] + Ket + End +------------------------------------------------------------------ + +/[Q-\N]/B,bad_escape_is_literal +Failed: error 108 at offset 4: range out of order in character class + +# ---------------------------------------------------------------------- + # End of testinput2 Error -65: PCRE2_ERROR_BADDATA (unknown error number) Error -62: bad serialized data diff --git a/testdata/testoutput5 b/testdata/testoutput5 index 091b06a..fd71dd3 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -4579,6 +4579,25 @@ No match X$ No match -# --------------------------------------------------------------------------- +# ---------------------------------------------------------------------- +# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option. + +/\x{d800}/B,utf,bad_escape_is_literal +------------------------------------------------------------------ + Bra + x{d800} + Ket + End +------------------------------------------------------------------ + +/\ud800/B,utf,alt_bsux,bad_escape_is_literal +------------------------------------------------------------------ + Bra + ud800 + Ket + End +------------------------------------------------------------------ + +# ---------------------------------------------------------------------- # End of testinput5 |