diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-01-26 15:31:27 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-01-26 15:31:27 +0000 |
commit | 4d10ecc5c3af5ddd08b98c70c00d1e6a120d864e (patch) | |
tree | ad942023a9cb1ee8df35339044dfd57e92e67dfe /testdata | |
parent | b3f42a32920b20ae71988bc1d06a7148e0211925 (diff) | |
download | pcre2-4d10ecc5c3af5ddd08b98c70c00d1e6a120d864e.tar.gz |
Fix bug in processing (?(DEFINE)...) within lookbehind assertions.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1212 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput1 | 13 | ||||
-rw-r--r-- | testdata/testinput2 | 4 | ||||
-rw-r--r-- | testdata/testoutput1 | 17 | ||||
-rw-r--r-- | testdata/testoutput2 | 5 |
4 files changed, 39 insertions, 0 deletions
diff --git a/testdata/testinput1 b/testdata/testinput1 index a002b78..c6b3647 100644 --- a/testdata/testinput1 +++ b/testdata/testinput1 @@ -6411,4 +6411,17 @@ ef) x/x,mark Hackdaws love my big sphinx of quartz. Pack my fox with five dozen liquor jugs. +"(?<=X(?(DEFINE)(A)))X(*F)" +\= Expect no match + AXYZ + +"(?<=X(?(DEFINE)(A)))." + AXYZ + +"(?<=X(?(DEFINE)(.*))Y)." + AXYZ + +"(?<=X(?(DEFINE)(Y))(?1))." + AXYZ + # End of testinput1 diff --git a/testdata/testinput2 b/testdata/testinput2 index b5c5188..cac6afa 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -5806,4 +5806,8 @@ a)"xI 12abc34xyz99abc55\=substitute_skip=1 12abc34xyz99abc55\=substitute_skip=2 +# Expect non-fixed-length error + +"(?<=X(?(DEFINE)(.*))(?1))." + # End of testinput2 diff --git a/testdata/testoutput1 b/testdata/testoutput1 index f196d56..4c43caa 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -10165,4 +10165,21 @@ No match Pack my fox with five dozen liquor jugs. No match +"(?<=X(?(DEFINE)(A)))X(*F)" +\= Expect no match + AXYZ +No match + +"(?<=X(?(DEFINE)(A)))." + AXYZ + 0: Y + +"(?<=X(?(DEFINE)(.*))Y)." + AXYZ + 0: Z + +"(?<=X(?(DEFINE)(Y))(?1))." + AXYZ + 0: Z + # End of testinput1 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index f066c78..bf272e1 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -17536,6 +17536,11 @@ Callout 0: last capture = 2 3(2) Old 12 15 "abc" New 5 10 "<abc>" 3: <abc><abc> +# Expect non-fixed-length error + +"(?<=X(?(DEFINE)(.*))(?1))." +Failed: error 125 at offset 0: lookbehind assertion is not fixed length + # End of testinput2 Error -70: PCRE2_ERROR_BADDATA (unknown error number) Error -62: bad serialized data |