diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-03 16:42:58 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-03 16:42:58 +0000 |
commit | 4ed24ba49fc4a584c58509177e5a3ad6d1a000e4 (patch) | |
tree | 748e07e2456656493ddcb098b8b852d32b081d6b /testdata | |
parent | 778799e8109592a370cc114c89b0f86c43af11f2 (diff) | |
download | pcre2-4ed24ba49fc4a584c58509177e5a3ad6d1a000e4.tar.gz |
Fix matching offsets from regexec() in the POSIX wrapper when called with
REG_STARTEND and a starting offset greater than zero.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@818 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput18 | 10 | ||||
-rw-r--r-- | testdata/testoutput18 | 17 |
2 files changed, 27 insertions, 0 deletions
diff --git a/testdata/testinput18 b/testdata/testinput18 index 7fc9b12..ececc06 100644 --- a/testdata/testinput18 +++ b/testdata/testinput18 @@ -113,4 +113,14 @@ /(?=(a\K))/ a +/^d(e)$/posix + acdef\=posix_startend=2:4 + acde\=posix_startend=2 +\= Expect no match + acdef + acdef\=posix_startend=2 + +/^a\x{00}b$/posix + a\x{00}b\=posix_startend=0:3 + # End of testdata/testinput18 diff --git a/testdata/testoutput18 b/testdata/testoutput18 index 6f68ca1..96386da 100644 --- a/testdata/testoutput18 +++ b/testdata/testoutput18 @@ -174,4 +174,21 @@ Start of matched string is beyond its end - displaying from end to start. 0: a 1: a +/^d(e)$/posix + acdef\=posix_startend=2:4 + 0: de + 1: e + acde\=posix_startend=2 + 0: de + 1: e +\= Expect no match + acdef +No match: POSIX code 17: match failed + acdef\=posix_startend=2 +No match: POSIX code 17: match failed + +/^a\x{00}b$/posix + a\x{00}b\=posix_startend=0:3 + 0: a\x00b + # End of testdata/testinput18 |