diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2018-09-03 15:20:40 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2018-09-03 15:20:40 +0000 |
commit | 3fc16f9f8acaaafb47b3276167e74d1ebb73915d (patch) | |
tree | f966bec1582e194fe0d9c996041bad955fc77f46 /testdata | |
parent | c2d378421fedba48cb02b6b3dc4a74d2a24b2dd4 (diff) | |
download | pcre2-3fc16f9f8acaaafb47b3276167e74d1ebb73915d.tar.gz |
Treat empty-string-matching repeated conditionals the same as ordinary ones
when checking for an anchored pattern.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@996 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput2 | 31 | ||||
-rw-r--r-- | testdata/testoutput2 | 92 |
2 files changed, 123 insertions, 0 deletions
diff --git a/testdata/testinput2 b/testdata/testinput2 index c0f4292..fc94b35 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -5474,4 +5474,35 @@ a)"xI /(?(1)^())b/I +/(?(1)^())+b/I,aftertext + abc + +/(?(1)^()|^)+b/I,aftertext + bbc +\= Expect no match + abc + +/(?(1)^()|^)*b/I,aftertext + bbc + abc + xbc + +/(?(1)^())+b/I,aftertext + abc + +/(?(1)^a()|^a)+b/I,aftertext + abc +\= Expect no match + bbc + +/(?(1)^|^(a))+b/I,aftertext + abc +\= Expect no match + bbc + +/(?(1)^a()|^a)*b/I,aftertext + abc + bbc + xbc + # End of testinput2 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 6f0dd12..ecf0d80 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -16671,6 +16671,98 @@ Max back reference = 1 Last code unit = 'b' Subject length lower bound = 1 +/(?(1)^())+b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Last code unit = 'b' +Subject length lower bound = 1 + abc + 0: b + 0+ c + +/(?(1)^()|^)+b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Compile options: <none> +Overall options: anchored +First code unit = 'b' +Subject length lower bound = 1 + bbc + 0: b + 0+ bc +\= Expect no match + abc +No match + +/(?(1)^()|^)*b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +First code unit = 'b' +Subject length lower bound = 1 + bbc + 0: b + 0+ bc + abc + 0: b + 0+ c + xbc + 0: b + 0+ c + +/(?(1)^())+b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Last code unit = 'b' +Subject length lower bound = 1 + abc + 0: b + 0+ c + +/(?(1)^a()|^a)+b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Compile options: <none> +Overall options: anchored +First code unit = 'a' +Last code unit = 'b' +Subject length lower bound = 2 + abc + 0: ab + 0+ c +\= Expect no match + bbc +No match + +/(?(1)^|^(a))+b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Compile options: <none> +Overall options: anchored +Last code unit = 'b' +Subject length lower bound = 1 + abc + 0: ab + 0+ c + 1: a +\= Expect no match + bbc +No match + +/(?(1)^a()|^a)*b/I,aftertext +Capturing subpattern count = 1 +Max back reference = 1 +Last code unit = 'b' +Subject length lower bound = 1 + abc + 0: ab + 0+ c + bbc + 0: b + 0+ bc + xbc + 0: b + 0+ c + # End of testinput2 Error -70: PCRE2_ERROR_BADDATA (unknown error number) Error -62: bad serialized data |