summaryrefslogtreecommitdiff
path: root/testdata/testinput15
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-06-26 08:23:47 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-06-26 08:23:47 +0000
commit29d1e2521ac05f63981a6d956ac3a6d49407fde6 (patch)
treefc4dbb29929dc264cf3901b3e9edd9762dae6050 /testdata/testinput15
parent364b0dfa5be62734ea830de6ce8eb9cdb497e545 (diff)
downloadpcre2-29d1e2521ac05f63981a6d956ac3a6d49407fde6.tar.gz
Make pcre2test show actual pre-match consulted characters for a partial match,
not the length of the longest lookbehind. Control this by "allusedtext". git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1122 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata/testinput15')
-rw-r--r--testdata/testinput1578
1 files changed, 58 insertions, 20 deletions
diff --git a/testdata/testinput15 b/testdata/testinput15
index 2ef6672..b51f4cd 100644
--- a/testdata/testinput15
+++ b/testdata/testinput15
@@ -16,14 +16,14 @@
/^(?>a)++/
aa\=find_limits
aaaaaaaaa\=find_limits
-
+
/(a)(?1)++/
aa\=find_limits
aaaaaaaaa\=find_limits
/a(?:.)*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
-
+
/a(?:.(*THEN))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
@@ -86,9 +86,9 @@
aaaaaaaaaaaaaz
\= Expect limit exceeded
aaaaaaaaaaaaaz\=depth_limit=10
-
-# These three have infinitely nested recursions.
-
+
+# These three have infinitely nested recursions.
+
/((?2))((?1))/
abc
@@ -97,21 +97,21 @@
/(?(R)a*(?1)|((?R))b)/
aaaabcde
-
+
# The allusedtext modifier does not work with JIT, which does not maintain
# the leftchar/rightchar data.
/abc(?=xyz)/allusedtext
abcxyzpqr
abcxyzpqr\=aftertext
-
+
/(?<=pqr)abc(?=xyz)/allusedtext
xyzpqrabcxyzpqr
xyzpqrabcxyzpqr\=aftertext
-
+
/a\b/
a.\=allusedtext
- a\=allusedtext
+ a\=allusedtext
/abc\Kxyz/
abcxyz\=allusedtext
@@ -121,7 +121,45 @@
/abc(?=abcde)(?=ab)/allusedtext
abcabcdefg
-
+
+#subject allusedtext
+
+/(?<=abc)123/
+ xyzabc123pqr
+ xyzabc12\=ps
+ xyzabc12\=ph
+
+/\babc\b/
+ +++abc+++
+ +++ab\=ps
+ +++ab\=ph
+
+/(?<=abc)def/
+ abc\=ph
+
+/(?<=123)(*MARK:xx)abc/mark
+ xxxx123a\=ph
+ xxxx123a\=ps
+
+/(?<=(?<=a)b)c.*/I
+ abc\=ph
+\= Expect no match
+ xbc\=ph
+
+/(?<=ab)c.*/I
+ abc\=ph
+\= Expect no match
+ xbc\=ph
+
+/abc(?<=bc)def/
+ xxxabcd\=ph
+
+/(?<=ab)cdef/
+ xxabcd\=ph
+
+#subject
+# -------------------------------------------------------------------
+
# These tests provoke recursion loops, which give a different error message
# when JIT is used.
@@ -130,26 +168,26 @@
/(a|(?R))/I
abcd
- defg
+ defg
/(ab|(bc|(de|(?R))))/I
abcd
- fghi
+ fghi
/(ab|(bc|(de|(?1))))/I
abcd
- fghi
+ fghi
/x(ab|(bc|(de|(?1)x)x)x)/I
xab123
- xfghi
+ xfghi
/(?!\w)(?R)/
abcd
- =abc
+ =abc
/(?=\w)(?R)/
- =abc
+ =abc
abcd
/(?<!\w)(?R)/
@@ -160,12 +198,12 @@
/(a+|(?R)b)/
aaa
- bbb
+ bbb
/[^\xff]((?1))/BI
abcd
-
-# These tests don't behave the same with JIT
+
+# These tests don't behave the same with JIT
/\w+(?C1)/BI,no_auto_possess
abc\=callout_fail=1
@@ -173,7 +211,7 @@
/(*NO_AUTO_POSSESS)\w+(?C1)/BI
abc\=callout_fail=1
-# This test breaks the JIT stack limit
+# This test breaks the JIT stack limit
/(|]+){2,2452}/
(|]+){2,2452}