2015-08-18 12:34:05 +02:00
|
|
|
# These are:
|
|
|
|
#
|
|
|
|
# (1) Tests of the match-limiting features. The results are different for
|
|
|
|
# interpretive or JIT matching, so this test should not be run with JIT. The
|
|
|
|
# same tests are run using JIT in test 17.
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
# (2) Other tests that must not be run with JIT.
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(a+)*zz/I
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
|
|
|
|
aaaaaaaaaaaaaz\=find_limits
|
|
|
|
|
|
|
|
!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
|
|
|
|
/* this is a C style comment */\=find_limits
|
|
|
|
|
|
|
|
/^(?>a)++/
|
|
|
|
aa\=find_limits
|
|
|
|
aaaaaaaaa\=find_limits
|
2019-06-26 10:23:47 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(a)(?1)++/
|
|
|
|
aa\=find_limits
|
|
|
|
aaaaaaaaa\=find_limits
|
|
|
|
|
|
|
|
/a(?:.)*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
2019-06-26 10:23:47 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/a(?:.(*THEN))*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
|
|
|
|
|
|
|
/a(?:.(*THEN:ABC))*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
|
|
|
|
|
|
|
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
|
|
|
|
/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
|
|
|
|
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
|
|
|
|
/(*LIMIT_MATCH=12bc)abc/
|
|
|
|
|
|
|
|
/(*LIMIT_MATCH=4294967290)abc/
|
|
|
|
|
2017-03-12 14:47:01 +01:00
|
|
|
/(*LIMIT_DEPTH=4294967280)abc/I
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(a+)*zz/
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=match_limit=3000
|
|
|
|
|
|
|
|
/(a+)*zz/
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2017-03-12 14:47:01 +01:00
|
|
|
aaaaaaaaaaaaaz\=depth_limit=10
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(*LIMIT_MATCH=3000)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=match_limit=60000
|
|
|
|
|
|
|
|
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
|
|
|
|
/(*LIMIT_MATCH=60000)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=match_limit=3000
|
|
|
|
|
2017-03-12 14:47:01 +01:00
|
|
|
/(*LIMIT_DEPTH=10)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2017-03-12 14:47:01 +01:00
|
|
|
aaaaaaaaaaaaaz\=depth_limit=1000
|
2015-08-18 12:34:05 +02:00
|
|
|
|
2017-03-12 14:47:01 +01:00
|
|
|
/(*LIMIT_DEPTH=10)(*LIMIT_DEPTH=1000)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
|
2017-03-12 14:47:01 +01:00
|
|
|
/(*LIMIT_DEPTH=1000)(a+)*zz/I
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
2018-04-29 17:07:44 +02:00
|
|
|
\= Expect limit exceeded
|
2017-03-12 14:47:01 +01:00
|
|
|
aaaaaaaaaaaaaz\=depth_limit=10
|
2019-06-26 10:23:47 +02:00
|
|
|
|
|
|
|
# These three have infinitely nested recursions.
|
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/((?2))((?1))/
|
|
|
|
abc
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
/((?(R2)a+|(?1)b))()/
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaabcde
|
|
|
|
|
|
|
|
/(?(R)a*(?1)|((?R))b)/
|
|
|
|
aaaabcde
|
2019-06-26 10:23:47 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
# The allusedtext modifier does not work with JIT, which does not maintain
|
|
|
|
# the leftchar/rightchar data.
|
|
|
|
|
|
|
|
/abc(?=xyz)/allusedtext
|
|
|
|
abcxyzpqr
|
|
|
|
abcxyzpqr\=aftertext
|
2019-06-26 10:23:47 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(?<=pqr)abc(?=xyz)/allusedtext
|
|
|
|
xyzpqrabcxyzpqr
|
|
|
|
xyzpqrabcxyzpqr\=aftertext
|
2019-06-26 10:23:47 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/a\b/
|
|
|
|
a.\=allusedtext
|
2019-06-26 10:23:47 +02:00
|
|
|
a\=allusedtext
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/abc\Kxyz/
|
|
|
|
abcxyz\=allusedtext
|
|
|
|
|
|
|
|
/abc(?=xyz(*ACCEPT))/
|
|
|
|
abcxyz\=allusedtext
|
|
|
|
|
|
|
|
/abc(?=abcde)(?=ab)/allusedtext
|
|
|
|
abcabcdefg
|
2019-06-26 10:23:47 +02:00
|
|
|
|
|
|
|
#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
|
|
|
|
# -------------------------------------------------------------------
|
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
# These tests provoke recursion loops, which give a different error message
|
|
|
|
# when JIT is used.
|
|
|
|
|
|
|
|
/(?R)/I
|
|
|
|
abcd
|
|
|
|
|
|
|
|
/(a|(?R))/I
|
|
|
|
abcd
|
2019-06-26 10:23:47 +02:00
|
|
|
defg
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(ab|(bc|(de|(?R))))/I
|
|
|
|
abcd
|
2019-06-26 10:23:47 +02:00
|
|
|
fghi
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(ab|(bc|(de|(?1))))/I
|
|
|
|
abcd
|
2019-06-26 10:23:47 +02:00
|
|
|
fghi
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/x(ab|(bc|(de|(?1)x)x)x)/I
|
|
|
|
xab123
|
2019-06-26 10:23:47 +02:00
|
|
|
xfghi
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(?!\w)(?R)/
|
|
|
|
abcd
|
2019-06-26 10:23:47 +02:00
|
|
|
=abc
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/(?=\w)(?R)/
|
2019-06-26 10:23:47 +02:00
|
|
|
=abc
|
2015-08-18 12:34:05 +02:00
|
|
|
abcd
|
|
|
|
|
|
|
|
/(?<!\w)(?R)/
|
|
|
|
abcd
|
|
|
|
|
|
|
|
/(?<=\w)(?R)/
|
|
|
|
abcd
|
|
|
|
|
|
|
|
/(a+|(?R)b)/
|
|
|
|
aaa
|
2019-06-26 10:23:47 +02:00
|
|
|
bbb
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/[^\xff]((?1))/BI
|
|
|
|
abcd
|
2019-06-26 10:23:47 +02:00
|
|
|
|
|
|
|
# These tests don't behave the same with JIT
|
2015-11-05 19:03:16 +01:00
|
|
|
|
|
|
|
/\w+(?C1)/BI,no_auto_possess
|
|
|
|
abc\=callout_fail=1
|
|
|
|
|
|
|
|
/(*NO_AUTO_POSSESS)\w+(?C1)/BI
|
|
|
|
abc\=callout_fail=1
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2019-06-26 10:23:47 +02:00
|
|
|
# This test breaks the JIT stack limit
|
2016-12-31 14:35:31 +01:00
|
|
|
|
|
|
|
/(|]+){2,2452}/
|
|
|
|
(|]+){2,2452}
|
|
|
|
|
2017-04-16 15:03:30 +02:00
|
|
|
/(*LIMIT_HEAP=21)\[(a)]{60}/expand
|
|
|
|
\[a]{60}
|
|
|
|
|
2015-01-23 17:51:47 +01:00
|
|
|
# End of testinput15
|