Work on the tests for JIT.

This commit is contained in:
Philip.Hazel 2014-10-06 17:28:42 +00:00
parent 4bdfd990af
commit 2148a4093e
14 changed files with 771 additions and 819 deletions

131
RunTest
View File

@ -64,15 +64,13 @@ title10="Test 10: Specials for the 8-bit library with UTF-8 and UCP support"
title11="Test 11: Specials for the basic 16-bit and 32-bit libraries" title11="Test 11: Specials for the basic 16-bit and 32-bit libraries"
title12="Test 12: Specials for the 16-bit and 32-bit libraries UTF and UCP support" title12="Test 12: Specials for the 16-bit and 32-bit libraries UTF and UCP support"
title13="Test 13: DFA specials for the basic 16-bit and 32-bit libraries" title13="Test 13: DFA specials for the basic 16-bit and 32-bit libraries"
title14="Test 14: JIT-specific features (when JIT is not available)" title14="Test 14: Non-JIT limits tests"
title15="Test 15: JIT-specific features (when JIT is available)" title15="Test 15: JIT-specific features when JIT is not available"
title16="Test 16: Tests of the POSIX interface, excluding UTF/UCP" title16="Test 16: JIT-specific features when JIT is available"
title17="Test 17: Tests of the POSIX interface with UTF/UCP" title17="Test 17: Tests of the POSIX interface, excluding UTF/UCP"
title18="Test 18: Tests of the POSIX interface with UTF/UCP"
#title21="Test 21: Reloads for the basic 16/32-bit library" maxtest=18
#title22="Test 22: Reloads for the 16/32-bit library with UTF-16/32 support"
maxtest=17
if [ $# -eq 1 -a "$1" = "list" ]; then if [ $# -eq 1 -a "$1" = "list" ]; then
echo $title1 echo $title1
@ -92,11 +90,7 @@ if [ $# -eq 1 -a "$1" = "list" ]; then
echo $title15 echo $title15
echo $title16 echo $title16
echo $title17 echo $title17
# echo $title18 echo $title18
# echo $title19
# echo $title20
# echo $title21
# echo $title22
exit 0 exit 0
fi fi
@ -181,11 +175,7 @@ do14=no
do15=no do15=no
do16=no do16=no
do17=no do17=no
#do18=no do18=no
#do19=no
#do20=no
#do21=no
#do22=no
while [ $# -gt 0 ] ; do while [ $# -gt 0 ] ; do
case $1 in case $1 in
@ -206,11 +196,7 @@ while [ $# -gt 0 ] ; do
15) do15=yes;; 15) do15=yes;;
16) do16=yes;; 16) do16=yes;;
17) do17=yes;; 17) do17=yes;;
# 18) do18=yes;; 18) do18=yes;;
# 19) do19=yes;;
# 20) do20=yes;;
# 21) do21=yes;;
# 22) do22=yes;;
-8) arg8=yes;; -8) arg8=yes;;
-16) arg16=yes;; -16) arg16=yes;;
-32) arg32=yes;; -32) arg32=yes;;
@ -335,11 +321,8 @@ if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
$do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \
$do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \ $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \
$do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \ $do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \
$do17 = no \ $do17 = no -a $do18 = no \
]; then ]; then
# -a $do18 = no -a $do19 = no -a $do20 = no -a \
# $do21 = no -a $do22 = no
do1=yes do1=yes
do2=yes do2=yes
do3=yes do3=yes
@ -357,11 +340,7 @@ if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
do15=yes do15=yes
do16=yes do16=yes
do17=yes do17=yes
# do18=yes do18=yes
# do19=yes
# do20=yes
# do21=yes
# do22=yes
fi fi
# Handle any explicit skips at this stage, so that an argument list may consist # Handle any explicit skips at this stage, so that an argument list may consist
@ -696,13 +675,10 @@ if [ $do13 = yes ] ; then
fi fi
fi fi
# Test JIT-specific features when JIT is not available # Test non-JIT match and recursion limits
if [ $do14 = yes ] ; then if [ $do14 = yes ] ; then
echo $title14 echo $title14
if [ $jit -ne 0 ] ; then
echo " Skipped because JIT is available"
else
$sim $valgrind ./pcre2test -q $bmode $testdata/testinput14 testtry $sim $valgrind ./pcre2test -q $bmode $testdata/testinput14 testtry
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
$cf $testdata/testoutput14 testtry $cf $testdata/testoutput14 testtry
@ -710,15 +686,14 @@ if [ $do14 = yes ] ; then
else exit 1 else exit 1
fi fi
echo " OK" echo " OK"
fi
fi fi
# Test JIT-specific features when JIT is available # Test JIT-specific features when JIT is not available
if [ $do15 = yes ] ; then if [ $do15 = yes ] ; then
echo $title15 echo $title15
if [ $jit -eq 0 -o "$nojit" = "yes" ] ; then if [ $jit -ne 0 ] ; then
echo " Skipped because JIT is not available or not usable" echo " Skipped because JIT is available"
else else
$sim $valgrind ./pcre2test -q $bmode $testdata/testinput15 testtry $sim $valgrind ./pcre2test -q $bmode $testdata/testinput15 testtry
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
@ -730,12 +705,12 @@ if [ $do15 = yes ] ; then
fi fi
fi fi
# Tests for the POSIX interface without UTF/UCP (8-bit only) # Test JIT-specific features when JIT is available
if [ $do16 = yes ] ; then if [ $do16 = yes ] ; then
echo $title16 echo $title16
if [ "$bits" = "16" -o "$bits" = "32" ] ; then if [ $jit -eq 0 -o "$nojit" = "yes" ] ; then
echo " Skipped when running 16/32-bit tests" echo " Skipped because JIT is not available or not usable"
else else
$sim $valgrind ./pcre2test -q $bmode $testdata/testinput16 testtry $sim $valgrind ./pcre2test -q $bmode $testdata/testinput16 testtry
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
@ -747,14 +722,12 @@ if [ $do16 = yes ] ; then
fi fi
fi fi
# Tests for the POSIX interface with UTF/UCP (8-bit only) # Tests for the POSIX interface without UTF/UCP (8-bit only)
if [ $do17 = yes ] ; then if [ $do17 = yes ] ; then
echo $title17 echo $title17
if [ "$bits" = "16" -o "$bits" = "32" ] ; then if [ "$bits" = "16" -o "$bits" = "32" ] ; then
echo " Skipped when running 16/32-bit tests" echo " Skipped when running 16/32-bit tests"
elif [ $utf -eq 0 ] ; then
echo " Skipped because UTF-$bits support is not available"
else else
$sim $valgrind ./pcre2test -q $bmode $testdata/testinput17 testtry $sim $valgrind ./pcre2test -q $bmode $testdata/testinput17 testtry
if [ $? = 0 ] ; then if [ $? = 0 ] ; then
@ -766,54 +739,24 @@ if [ $do17 = yes ] ; then
fi fi
fi fi
## Tests for reloads with 16/32-bit library # Tests for the POSIX interface with UTF/UCP (8-bit only)
#
#if [ $do21 = yes ] ; then if [ $do18 = yes ] ; then
# echo $title21 echo $title18
# if [ "$bits" = "8" ] ; then if [ "$bits" = "16" -o "$bits" = "32" ] ; then
# echo " Skipped when running 8-bit tests" echo " Skipped when running 16/32-bit tests"
# elif [ $link_size -ne 2 ] ; then elif [ $utf -eq 0 ] ; then
# echo " Skipped because link size is not 2" echo " Skipped because UTF-$bits support is not available"
# else else
# cp -f $testdata/saved8 testsaved8 $sim $valgrind ./pcre2test -q $bmode $testdata/testinput18 testtry
# cp -f $testdata/saved16LE-1 testsaved16LE-1 if [ $? = 0 ] ; then
# cp -f $testdata/saved16BE-1 testsaved16BE-1 $cf $testdata/testoutput18 testtry
# cp -f $testdata/saved32LE-1 testsaved32LE-1 if [ $? != 0 ] ; then exit 1; fi
# cp -f $testdata/saved32BE-1 testsaved32BE-1 else exit 1
# $sim $valgrind ./pcre2test -q $bmode $testdata/testinput21 testtry fi
# if [ $? = 0 ] ; then echo " OK"
# $cf $testdata/testoutput21-$bits testtry fi
# if [ $? != 0 ] ; then exit 1; fi fi
# else exit 1
# fi
# echo " OK"
# fi
#fi
#
## Tests for reloads with 16/32-bit library (UTF-16 support)
#
#if [ $do22 = yes ] ; then
# echo $title22
# if [ "$bits" = "8" ] ; then
# echo " Skipped when running 8-bit tests"
# elif [ $utf -eq 0 ] ; then
# echo " Skipped because UTF-$bits support is not available"
# elif [ $link_size -ne 2 ] ; then
# echo " Skipped because link size is not 2"
# else
# cp -f $testdata/saved16LE-2 testsaved16LE-2
# cp -f $testdata/saved16BE-2 testsaved16BE-2
# cp -f $testdata/saved32LE-2 testsaved32LE-2
# cp -f $testdata/saved32BE-2 testsaved32BE-2
# $sim $valgrind ./pcre2test -q $bmode $testdata/testinput22 testtry
# if [ $? = 0 ] ; then
# $cf $testdata/testoutput22-$bits testtry
# if [ $? != 0 ] ; then exit 1; fi
# else exit 1
# fi
# echo " OK"
# fi
#fi
# End of loop for 8/16/32-bit tests # End of loop for 8/16/32-bit tests
done done

View File

@ -6606,7 +6606,6 @@ else
mb->offset_end = ocount; mb->offset_end = ocount;
mb->offset_max = (2*ocount)/3; mb->offset_max = (2*ocount)/3;
mb->capture_last = 0;
/* Reset the working variable associated with each extraction. These should /* Reset the working variable associated with each extraction. These should
never be used unless previously set, but they get saved and restored, and so we never be used unless previously set, but they get saved and restored, and so we
@ -6673,6 +6672,7 @@ the loop runs just once. */
for(;;) for(;;)
{ {
PCRE2_SPTR new_start_match; PCRE2_SPTR new_start_match;
mb->capture_last = 0;
/* ----------------- Start of match optimizations ---------------- */ /* ----------------- Start of match optimizations ---------------- */

85
testdata/testinput14 vendored
View File

@ -1,9 +1,84 @@
# This test is run only when JIT support is not available. It checks that an # These are tests of the match-limiting features. The results are different for
# attempt to use it has the expected behaviour. It also tests things that # interpretive or JIT matching, so this test should not be run with JIT. The
# are different without JIT. # same tests are run using JIT in test 16.
/abc/I,jit,jitverify /(a+)*zz/I
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
aaaaaaaaaaaaaz\=find_limits
/a*/I !((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
/* this is a C style comment */\=find_limits
/^(?>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
/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/
/(*LIMIT_RECURSION=4294967280)abc/I
/(a+)*zz/
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=3000
/(a+)*zz/
aaaaaaaaaaaaaz\=recursion_limit=10
/(*LIMIT_MATCH=3000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=60000
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
aaaaaaaaaaaaaz
/(*LIMIT_MATCH=60000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=3000
/(*LIMIT_RECURSION=10)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=recursion_limit=1000
/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/I
aaaaaaaaaaaaaz
/(*LIMIT_RECURSION=1000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=recursion_limit=10
# These three have infinitely nested recursions.
/((?2))((?1))/
abc
/((?(R2)a+|(?1)b))/
aaaabcde
/(?(R)a*(?1)|((?R))b)/
aaaabcde
# End of testinput14 # End of testinput14

88
testdata/testinput15 vendored
View File

@ -1,87 +1,9 @@
# This test is run only when JIT support is available. It checks for a # This test is run only when JIT support is not available. It checks that an
# successful and an unsuccessful JIT compile, and a couple of things that are # attempt to use it has the expected behaviour. It also tests things that
# different with JIT. # are different without JIT.
/abc/I,jit /abc/I,jit,jitverify
/(?(?C1)(?=a)a)/I,jit
/(?(?C1)(?=a)a)/I
/a*/I /a*/I
/(?(R)a*(?1)|((?R))b)/jit # End of testinput14
aaaabcde
# Test various compile modes
#pattern jit,jitverify
/abcd/
abcd
xyz
/abcd/
abcd
ab\=ps
ab\=ph
xyz
/abcd/
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=1
abcd
ab\=ps
ab\=ph
xyz
xyz\=ps
/abcd/jit=2
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=3
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=4
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=5
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=6
abcd
ab\=ps
ab\=ph
xyz
/abcd/jit=7
abcd
ab\=ps
ab\=ph
xyz
/abcd/I,jit=2
/(*NO_START_OPT)a(*:m)b/mark
a
/^12345678abcd/m
12345678abcd
# End of testinput15

126
testdata/testinput16 vendored
View File

@ -1,81 +1,87 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX # This test is run only when JIT support is available. It checks for a
# interface, which is supported only with the 8-bit library. This test should # successful and an unsuccessful JIT compile, and a couple of things that are
# not be run with JIT (which is not available for the POSIX interface). # different with JIT.
#forbid_utf /abc/I,jit
#pattern posix
/abc/ /(?(?C1)(?=a)a)/I,jit
abc
*** Failers
/^abc|def/ /(?(?C1)(?=a)a)/I
abcdef
abcdef\=notbol
/.*((abc)$|(def))/ /a*/I
defabc
defabc\=noteol
/the quick brown fox/ /(?(R)a*(?1)|((?R))b)/jit
the quick brown fox aaaabcde
*** Failers
The Quick Brown Fox
/the quick brown fox/i # Test various compile modes
the quick brown fox
The Quick Brown Fox
/abc.def/ #pattern jit,jitverify
*** Failers
abc\ndef
/abc$/ /abcd/
abc abcd
abc\n xyz
/(abc)\2/ /abcd/
abcd
ab\=ps
ab\=ph
xyz
/(abc\1)/ /abcd/
abc abcd
ab\=ps
ab\=ph
xyz
/a*(b+)(z)(z)/ /abcd/jit=1
aaaabbbbzzzz abcd
aaaabbbbzzzz\=ovector=0 ab\=ps
aaaabbbbzzzz\=ovector=1 ab\=ph
aaaabbbbzzzz\=ovector=2 xyz
xyz\=ps
/ab.cd/ /abcd/jit=2
ab-cd abcd
ab=cd ab\=ps
** Failers ab\=ph
ab\ncd xyz
/ab.cd/s /abcd/jit=3
ab-cd abcd
ab=cd ab\=ps
ab\ncd ab\=ph
xyz
/a(b)c/no_auto_capture /abcd/jit=4
abc abcd
ab\=ps
ab\=ph
xyz
/a(?P<name>b)c/no_auto_capture /abcd/jit=5
abc abcd
ab\=ps
ab\=ph
xyz
/a?|b?/ /abcd/jit=6
abc abcd
** Failers ab\=ps
ddd\=notempty ab\=ph
xyz
/\w+A/ /abcd/jit=7
CDAAAAB abcd
ab\=ps
ab\=ph
xyz
/\w+A/ungreedy /abcd/I,jit=2
CDAAAAB
/\Biss\B/I,aftertext /(*NO_START_OPT)a(*:m)b/mark
Mississippi a
/abc/\ /^12345678abcd/m
12345678abcd
# End of testdata/testinput16 # End of testinput15

84
testdata/testinput17 vendored
View File

@ -1,17 +1,81 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX # This set of tests is run only with the 8-bit library. It tests the POSIX
# interface with UTF/UCP support, which is supported only with the 8-bit # interface, which is supported only with the 8-bit library. This test should
# library. This test should not be run with JIT (which is not available for the # not be run with JIT (which is not available for the POSIX interface).
# POSIX interface).
#forbid_utf
#pattern posix #pattern posix
/a\x{1234}b/utf /abc/
a\x{1234}b abc
*** Failers
/\w/ /^abc|def/
+++\x{c2} abcdef
abcdef\=notbol
/\w/ucp /.*((abc)$|(def))/
+++\x{c2} defabc
defabc\=noteol
# End of testdata/testinput17 /the quick brown fox/
the quick brown fox
*** Failers
The Quick Brown Fox
/the quick brown fox/i
the quick brown fox
The Quick Brown Fox
/abc.def/
*** Failers
abc\ndef
/abc$/
abc
abc\n
/(abc)\2/
/(abc\1)/
abc
/a*(b+)(z)(z)/
aaaabbbbzzzz
aaaabbbbzzzz\=ovector=0
aaaabbbbzzzz\=ovector=1
aaaabbbbzzzz\=ovector=2
/ab.cd/
ab-cd
ab=cd
** Failers
ab\ncd
/ab.cd/s
ab-cd
ab=cd
ab\ncd
/a(b)c/no_auto_capture
abc
/a(?P<name>b)c/no_auto_capture
abc
/a?|b?/
abc
** Failers
ddd\=notempty
/\w+A/
CDAAAAB
/\w+A/ungreedy
CDAAAAB
/\Biss\B/I,aftertext
Mississippi
/abc/\
# End of testdata/testinput16

17
testdata/testinput18 vendored Normal file
View File

@ -0,0 +1,17 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX
# interface with UTF/UCP support, which is supported only with the 8-bit
# library. This test should not be run with JIT (which is not available for the
# POSIX interface).
#pattern posix
/a\x{1234}b/utf
a\x{1234}b
/\w/
+++\x{c2}
/\w/ucp
+++\x{c2}
# End of testdata/testinput17

79
testdata/testinput2 vendored
View File

@ -1220,10 +1220,6 @@
/(a)(?P<named>bc)/IB,no_auto_capture /(a)(?P<named>bc)/IB,no_auto_capture
/(a+)*zz/I
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
aaaaaaaaaaaaaz\=find_limits
/(aaa(?C1)bbb|ab)/I /(aaa(?C1)bbb|ab)/I
aaabbb aaabbb
aaabbb\=callout_data=0 aaabbb\=callout_data=0
@ -1584,9 +1580,6 @@ a random value. /Ix
abc\rdef abc\rdef
abc\r\ndef abc\r\ndef
!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
/* this is a C style comment */\=find_limits
/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
/()()()()()()()()()()()()()()()()()()()() /()()()()()()()()()()()()()()()()()()()()
@ -3274,14 +3267,6 @@ a random value. /Ix
/(abc)(?1)/I /(abc)(?1)/I
/^(?>a)++/
aa\=find_limits
aaaaaaaaa\=find_limits
/(a)(?1)++/
aa\=find_limits
aaaaaaaaa\=find_limits
/(?:(foo)|(bar)|(baz))X/allcaptures /(?:(foo)|(bar)|(baz))X/allcaptures
bazfooX bazfooX
foobazbarX foobazbarX
@ -3317,15 +3302,6 @@ a random value. /Ix
/[:a[:abc]b:]/B /[:a[:abc]b:]/B
/((?2))((?1))/
abc
/((?(R2)a+|(?1)b))/
aaaabcde
/(?(R)a*(?1)|((?R))b)/
aaaabcde
/(a+|(?R)b)/ /(a+|(?R)b)/
/^(a(*:A)(d|e(*:B))z|aeq)/auto_callout /^(a(*:A)(d|e(*:B))z|aeq)/auto_callout
@ -3357,15 +3333,6 @@ a random value. /Ix
/z(*ACCEPT)a/I,aftertext /z(*ACCEPT)a/I,aftertext
baxzbx baxzbx
/a(?:.)*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
/a(?:.(*THEN))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
/a(?:.(*THEN:ABC))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
/^(?>a+)(?>(z+))\w/B /^(?>a+)(?>(z+))\w/B
aaaazzzzb aaaazzzzb
** Failers ** Failers
@ -3384,15 +3351,6 @@ a random value. /Ix
/(a\1z)/B /(a\1z)/B
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
aabbccddee\=find_limits
/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
aabbccddee\=find_limits
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
aabbccddee\=find_limits
/^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames /^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
aAz aAz
*** Failers *** Failers
@ -3741,43 +3699,6 @@ a random value. /Ix
/(?=b(*THEN)a|)bn|bnn/ /(?=b(*THEN)a|)bn|bnn/
bnn bnn
# ---------------------
/(*LIMIT_MATCH=12bc)abc/
/(*LIMIT_MATCH=4294967290)abc/
/(*LIMIT_RECURSION=4294967280)abc/I
/(a+)*zz/
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=3000
/(a+)*zz/
aaaaaaaaaaaaaz\=recursion_limit=10
/(*LIMIT_MATCH=3000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=60000
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
aaaaaaaaaaaaaz
/(*LIMIT_MATCH=60000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=match_limit=3000
/(*LIMIT_RECURSION=10)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=recursion_limit=1000
/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/I
aaaaaaaaaaaaaz
/(*LIMIT_RECURSION=1000)(a+)*zz/I
aaaaaaaaaaaaaz
aaaaaaaaaaaaaz\=recursion_limit=10
# This test causes a segfault with Perl 5.18.0 # This test causes a segfault with Perl 5.18.0
/^(?=(a)){0}b(?1)/ /^(?=(a)){0}b(?1)/

196
testdata/testoutput14 vendored
View File

@ -1,17 +1,195 @@
# This test is run only when JIT support is not available. It checks that an # These are tests of the match-limiting features. The results are different for
# attempt to use it has the expected behaviour. It also tests things that # interpretive or JIT matching, so this test should not be run with JIT. The
# are different without JIT. # same tests are run using JIT in test 16.
/abc/I,jit,jitverify /(a+)*zz/I
Capturing subpattern count = 1
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
Minimum match limit = 8
Minimum recursion limit = 6
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaz\=find_limits
Minimum match limit = 32768
Minimum recursion limit = 29
No match
!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
Capturing subpattern count = 1
May match empty string
Subject length lower bound = 0
/* this is a C style comment */\=find_limits
Minimum match limit = 120
Minimum recursion limit = 6
0: /* this is a C style comment */
1: /* this is a C style comment */
/^(?>a)++/
aa\=find_limits
Minimum match limit = 5
Minimum recursion limit = 2
0: aa
aaaaaaaaa\=find_limits
Minimum match limit = 12
Minimum recursion limit = 2
0: aaaaaaaaa
/(a)(?1)++/
aa\=find_limits
Minimum match limit = 7
Minimum recursion limit = 4
0: aa
1: a
aaaaaaaaa\=find_limits
Minimum match limit = 21
Minimum recursion limit = 4
0: aaaaaaaaa
1: a
/a(?:.)*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 65
Minimum recursion limit = 2
0: abbbbbbbbbbbbbbbbbbbbba
/a(?:.(*THEN))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
0: abbbbbbbbbbbbbbbbbbbbba
/a(?:.(*THEN:ABC))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
0: abbbbbbbbbbbbbbbbbbbbba
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
aabbccddee\=find_limits
Minimum match limit = 7
Minimum recursion limit = 2
0: aabbccddee
/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
aabbccddee\=find_limits
Minimum match limit = 17
Minimum recursion limit = 16
0: aabbccddee
1: aa
2: bb
3: cc
4: dd
5: ee
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
aabbccddee\=find_limits
Minimum match limit = 13
Minimum recursion limit = 10
0: aabbccddee
1: aa
2: cc
3: ee
/(*LIMIT_MATCH=12bc)abc/
Failed: error 160 at offset 0: (*VERB) not recognized or malformed
/(*LIMIT_MATCH=4294967290)abc/
Failed: error 160 at offset 0: (*VERB) not recognized or malformed
/(*LIMIT_RECURSION=4294967280)abc/I
Capturing subpattern count = 0 Capturing subpattern count = 0
Recursion limit = 4294967280
First code unit = 'a' First code unit = 'a'
Last code unit = 'c' Last code unit = 'c'
Subject length lower bound = 3 Subject length lower bound = 3
JIT support is not available in this version of PCRE2
/a*/I /(a+)*zz/
Capturing subpattern count = 0 aaaaaaaaaaaaaz
May match empty string No match
Subject length lower bound = 0 aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -45: match limit exceeded
/(a+)*zz/
aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -50: recursion limit exceeded
/(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -45: match limit exceeded
aaaaaaaaaaaaaz\=match_limit=60000
Failed: error -45: match limit exceeded
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -45: match limit exceeded
/(*LIMIT_MATCH=60000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 60000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -45: match limit exceeded
/(*LIMIT_RECURSION=10)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 10
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -50: recursion limit exceeded
aaaaaaaaaaaaaz\=recursion_limit=1000
Failed: error -50: recursion limit exceeded
/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
/(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -50: recursion limit exceeded
# These three have infinitely nested recursions.
/((?2))((?1))/
abc
Failed: error -49: nested recursion at the same subject position
/((?(R2)a+|(?1)b))/
aaaabcde
Failed: error -49: nested recursion at the same subject position
/(?(R)a*(?1)|((?R))b)/
aaaabcde
Failed: error -49: nested recursion at the same subject position
# End of testinput14 # End of testinput14

163
testdata/testoutput15 vendored
View File

@ -1,164 +1,17 @@
# This test is run only when JIT support is available. It checks for a # This test is run only when JIT support is not available. It checks that an
# successful and an unsuccessful JIT compile, and a couple of things that are # attempt to use it has the expected behaviour. It also tests things that
# different with JIT. # are different without JIT.
/abc/I,jit /abc/I,jit,jitverify
Capturing subpattern count = 0 Capturing subpattern count = 0
No options
First code unit = 'a' First code unit = 'a'
Need char = 'c' Last code unit = 'c'
Subject length lower bound = 3 Subject length lower bound = 3
No starting char list JIT support is not available in this version of PCRE2
JIT study was successful
/(?(?C1)(?=a)a)/I,jit
Capturing subpattern count = 0
May match empty string
No options
No first code unit
No last code unit
Study returned NULL
JIT study was not successful
/(?(?C1)(?=a)a)/I
Capturing subpattern count = 0
May match empty string
No options
No first code unit
No last code unit
Subject length lower bound = -1
No starting char list
JIT study was not successful
/a*/I /a*/I
Capturing subpattern count = 0 Capturing subpattern count = 0
May match empty string May match empty string
No options Subject length lower bound = 0
No first code unit
No last code unit
Study returned NULL
/(?(R)a*(?1)|((?R))b)/S+ # End of testinput14
aaaabcde
Error -27 (JIT stack limit reached)
# Test various compile modes
#pattern jit,jitverify
/abcd/
abcd
0: abcd (JIT)
xyz
No match (JIT)
/abcd/
abcd
0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/abcd/
abcd
0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/abcd/jit=1
abcd
0: abcd (JIT)
ab\P
Partial match: ab
ab\P\P
Partial match: ab
xyz
No match (JIT)
xyz\P
No match
/abcd/jit=2
abcd
0: abcd
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab
xyz
No match
/abcd/jit=3
abcd
0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab
xyz
No match (JIT)
/abcd/jit=4
abcd
0: abcd
ab\P
Partial match: ab
ab\P\P
Partial match: ab (JIT)
xyz
No match
/abcd/jit=5
abcd
0: abcd (JIT)
ab\P
Partial match: ab
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/abcd/jit=6
abcd
0: abcd
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match
/abcd/jit=7
abcd
0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/abcd/I,jit=2
Capturing subpattern count = 0
No options
First code unit = 'a'
Last code unit = 'd'
Subject length lower bound = 4
No starting char list
JIT study was successful
/(*NO_START_OPT)a(*:m)b/mark
a
No match, mark = m (JIT)
/^12345678abcd/m
12345678abcd
0: 12345678abcd (JIT)
# End of testinput15

250
testdata/testoutput16 vendored
View File

@ -1,128 +1,164 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX # This test is run only when JIT support is available. It checks for a
# interface, which is supported only with the 8-bit library. This test should # successful and an unsuccessful JIT compile, and a couple of things that are
# not be run with JIT (which is not available for the POSIX interface). # different with JIT.
#forbid_utf /abc/I,jit
#pattern posix Capturing subpattern count = 0
No options
First code unit = 'a'
Need char = 'c'
Subject length lower bound = 3
No starting char list
JIT study was successful
/abc/ /(?(?C1)(?=a)a)/I,jit
abc Capturing subpattern count = 0
0: abc May match empty string
*** Failers No options
No match: POSIX code 17: match failed No first code unit
No last code unit
Study returned NULL
JIT study was not successful
/^abc|def/ /(?(?C1)(?=a)a)/I
abcdef Capturing subpattern count = 0
0: abc May match empty string
abcdef\=notbol No options
0: def No first code unit
No last code unit
Subject length lower bound = -1
No starting char list
JIT study was not successful
/.*((abc)$|(def))/ /a*/I
defabc Capturing subpattern count = 0
0: defabc May match empty string
1: abc No options
2: abc No first code unit
defabc\=noteol No last code unit
0: def Study returned NULL
1: def
3: def
/the quick brown fox/ /(?(R)a*(?1)|((?R))b)/S+
the quick brown fox aaaabcde
0: the quick brown fox Error -27 (JIT stack limit reached)
*** Failers
No match: POSIX code 17: match failed
The Quick Brown Fox
No match: POSIX code 17: match failed
/the quick brown fox/i # Test various compile modes
the quick brown fox
0: the quick brown fox
The Quick Brown Fox
0: The Quick Brown Fox
/abc.def/ #pattern jit,jitverify
*** Failers
No match: POSIX code 17: match failed
abc\ndef
No match: POSIX code 17: match failed
/abc$/ /abcd/
abc abcd
0: abc 0: abcd (JIT)
abc\n xyz
0: abc No match (JIT)
/(abc)\2/ /abcd/
Failed: POSIX code 15: bad back reference at offset 7 abcd
0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/(abc\1)/ /abcd/
abc abcd
No match: POSIX code 17: match failed 0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/a*(b+)(z)(z)/ /abcd/jit=1
aaaabbbbzzzz abcd
0: aaaabbbbzz 0: abcd (JIT)
1: bbbb ab\P
2: z Partial match: ab
3: z ab\P\P
aaaabbbbzzzz\=ovector=0 Partial match: ab
Matched without capture xyz
aaaabbbbzzzz\=ovector=1 No match (JIT)
0: aaaabbbbzz xyz\P
aaaabbbbzzzz\=ovector=2 No match
0: aaaabbbbzz
1: bbbb
/ab.cd/ /abcd/jit=2
ab-cd abcd
0: ab-cd 0: abcd
ab=cd ab\P
0: ab=cd Partial match: ab (JIT)
** Failers ab\P\P
No match: POSIX code 17: match failed Partial match: ab
ab\ncd xyz
No match: POSIX code 17: match failed No match
/ab.cd/s /abcd/jit=3
ab-cd abcd
0: ab-cd 0: abcd (JIT)
ab=cd ab\P
0: ab=cd Partial match: ab (JIT)
ab\ncd ab\P\P
0: ab\x0acd Partial match: ab
xyz
No match (JIT)
/a(b)c/no_auto_capture /abcd/jit=4
abc abcd
Matched with REG_NOSUB 0: abcd
ab\P
Partial match: ab
ab\P\P
Partial match: ab (JIT)
xyz
No match
/a(?P<name>b)c/no_auto_capture /abcd/jit=5
abc abcd
Matched with REG_NOSUB 0: abcd (JIT)
ab\P
Partial match: ab
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/a?|b?/ /abcd/jit=6
abc abcd
0: a 0: abcd
** Failers ab\P
0: Partial match: ab (JIT)
ddd\=notempty ab\P\P
No match: POSIX code 17: match failed Partial match: ab (JIT)
xyz
No match
/\w+A/ /abcd/jit=7
CDAAAAB abcd
0: CDAAAA 0: abcd (JIT)
ab\P
Partial match: ab (JIT)
ab\P\P
Partial match: ab (JIT)
xyz
No match (JIT)
/\w+A/ungreedy /abcd/I,jit=2
CDAAAAB Capturing subpattern count = 0
0: CDA No options
First code unit = 'a'
Last code unit = 'd'
Subject length lower bound = 4
No starting char list
JIT study was successful
/\Biss\B/I,aftertext /(*NO_START_OPT)a(*:m)b/mark
** Ignored with POSIX interface: info a
Mississippi No match, mark = m (JIT)
0: iss
0+ issippi
/abc/\ /^12345678abcd/m
Failed: POSIX code 9: bad escape sequence at offset 4 12345678abcd
0: 12345678abcd (JIT)
# End of testdata/testinput16 # End of testinput15

134
testdata/testoutput17 vendored
View File

@ -1,20 +1,128 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX # This set of tests is run only with the 8-bit library. It tests the POSIX
# interface with UTF/UCP support, which is supported only with the 8-bit # interface, which is supported only with the 8-bit library. This test should
# library. This test should not be run with JIT (which is not available for the # not be run with JIT (which is not available for the POSIX interface).
# POSIX interface).
#forbid_utf
#pattern posix #pattern posix
/a\x{1234}b/utf /abc/
a\x{1234}b abc
0: a\x{1234}b 0: abc
*** Failers
/\w/
+++\x{c2}
No match: POSIX code 17: match failed No match: POSIX code 17: match failed
/\w/ucp /^abc|def/
+++\x{c2} abcdef
0: \xc2 0: abc
abcdef\=notbol
0: def
# End of testdata/testinput17 /.*((abc)$|(def))/
defabc
0: defabc
1: abc
2: abc
defabc\=noteol
0: def
1: def
3: def
/the quick brown fox/
the quick brown fox
0: the quick brown fox
*** Failers
No match: POSIX code 17: match failed
The Quick Brown Fox
No match: POSIX code 17: match failed
/the quick brown fox/i
the quick brown fox
0: the quick brown fox
The Quick Brown Fox
0: The Quick Brown Fox
/abc.def/
*** Failers
No match: POSIX code 17: match failed
abc\ndef
No match: POSIX code 17: match failed
/abc$/
abc
0: abc
abc\n
0: abc
/(abc)\2/
Failed: POSIX code 15: bad back reference at offset 7
/(abc\1)/
abc
No match: POSIX code 17: match failed
/a*(b+)(z)(z)/
aaaabbbbzzzz
0: aaaabbbbzz
1: bbbb
2: z
3: z
aaaabbbbzzzz\=ovector=0
Matched without capture
aaaabbbbzzzz\=ovector=1
0: aaaabbbbzz
aaaabbbbzzzz\=ovector=2
0: aaaabbbbzz
1: bbbb
/ab.cd/
ab-cd
0: ab-cd
ab=cd
0: ab=cd
** Failers
No match: POSIX code 17: match failed
ab\ncd
No match: POSIX code 17: match failed
/ab.cd/s
ab-cd
0: ab-cd
ab=cd
0: ab=cd
ab\ncd
0: ab\x0acd
/a(b)c/no_auto_capture
abc
Matched with REG_NOSUB
/a(?P<name>b)c/no_auto_capture
abc
Matched with REG_NOSUB
/a?|b?/
abc
0: a
** Failers
0:
ddd\=notempty
No match: POSIX code 17: match failed
/\w+A/
CDAAAAB
0: CDAAAA
/\w+A/ungreedy
CDAAAAB
0: CDA
/\Biss\B/I,aftertext
** Ignored with POSIX interface: info
Mississippi
0: iss
0+ issippi
/abc/\
Failed: POSIX code 9: bad escape sequence at offset 4
# End of testdata/testinput16

20
testdata/testoutput18 vendored Normal file
View File

@ -0,0 +1,20 @@
# This set of tests is run only with the 8-bit library. It tests the POSIX
# interface with UTF/UCP support, which is supported only with the 8-bit
# library. This test should not be run with JIT (which is not available for the
# POSIX interface).
#pattern posix
/a\x{1234}b/utf
a\x{1234}b
0: a\x{1234}b
/\w/
+++\x{c2}
No match: POSIX code 17: match failed
/\w/ucp
+++\x{c2}
0: \xc2
# End of testdata/testinput17

191
testdata/testoutput2 vendored
View File

@ -4303,21 +4303,6 @@ First code unit = 'a'
Last code unit = 'c' Last code unit = 'c'
Subject length lower bound = 3 Subject length lower bound = 3
/(a+)*zz/I
Capturing subpattern count = 1
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
Minimum match limit = 8
Minimum recursion limit = 6
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaz\=find_limits
Minimum match limit = 32768
Minimum recursion limit = 29
No match
/(aaa(?C1)bbb|ab)/I /(aaa(?C1)bbb|ab)/I
Capturing subpattern count = 1 Capturing subpattern count = 1
First code unit = 'a' First code unit = 'a'
@ -6143,16 +6128,6 @@ Subject length lower bound = 5
1: \x0d 1: \x0d
2: \x0a 2: \x0a
!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
Capturing subpattern count = 1
May match empty string
Subject length lower bound = 0
/* this is a C style comment */\=find_limits
Minimum match limit = 120
Minimum recursion limit = 6
0: /* this is a C style comment */
1: /* this is a C style comment */
/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
Capturing subpattern count = 1 Capturing subpattern count = 1
Named capturing subpatterns: Named capturing subpatterns:
@ -10876,28 +10851,6 @@ First code unit = 'a'
Last code unit = 'c' Last code unit = 'c'
Subject length lower bound = 6 Subject length lower bound = 6
/^(?>a)++/
aa\=find_limits
Minimum match limit = 5
Minimum recursion limit = 2
0: aa
aaaaaaaaa\=find_limits
Minimum match limit = 12
Minimum recursion limit = 2
0: aaaaaaaaa
/(a)(?1)++/
aa\=find_limits
Minimum match limit = 7
Minimum recursion limit = 4
0: aa
1: a
aaaaaaaaa\=find_limits
Minimum match limit = 21
Minimum recursion limit = 4
0: aaaaaaaaa
1: a
/(?:(foo)|(bar)|(baz))X/allcaptures /(?:(foo)|(bar)|(baz))X/allcaptures
bazfooX bazfooX
0: fooX 0: fooX
@ -10931,7 +10884,6 @@ Matched, but too many substrings
Matched, but too many substrings Matched, but too many substrings
0: fooX 0: fooX
bazfooX\=ovector=2 bazfooX\=ovector=2
Matched, but too many substrings
0: fooX 0: fooX
1: foo 1: foo
bazfooX\=ovector=3 bazfooX\=ovector=3
@ -11097,18 +11049,6 @@ Matched, but too many substrings
End End
------------------------------------------------------------------ ------------------------------------------------------------------
/((?2))((?1))/
abc
Failed: error -49: nested recursion at the same subject position
/((?(R2)a+|(?1)b))/
aaaabcde
Failed: error -49: nested recursion at the same subject position
/(?(R)a*(?1)|((?R))b)/
aaaabcde
Failed: error -49: nested recursion at the same subject position
/(a+|(?R)b)/ /(a+|(?R)b)/
Failed: error 140 at offset 7: recursion could loop indefinitely Failed: error 140 at offset 7: recursion could loop indefinitely
@ -11227,24 +11167,6 @@ Subject length lower bound = 0
0: z 0: z
0+ bx 0+ bx
/a(?:.)*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 65
Minimum recursion limit = 2
0: abbbbbbbbbbbbbbbbbbbbba
/a(?:.(*THEN))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
0: abbbbbbbbbbbbbbbbbbbbba
/a(?:.(*THEN:ABC))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
0: abbbbbbbbbbbbbbbbbbbbba
/^(?>a+)(?>(z+))\w/B /^(?>a+)(?>(z+))\w/B
------------------------------------------------------------------ ------------------------------------------------------------------
Bra Bra
@ -11311,32 +11233,6 @@ No match
End End
------------------------------------------------------------------ ------------------------------------------------------------------
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
aabbccddee\=find_limits
Minimum match limit = 7
Minimum recursion limit = 2
0: aabbccddee
/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
aabbccddee\=find_limits
Minimum match limit = 17
Minimum recursion limit = 16
0: aabbccddee
1: aa
2: bb
3: cc
4: dd
5: ee
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
aabbccddee\=find_limits
Minimum match limit = 13
Minimum recursion limit = 10
0: aabbccddee
1: aa
2: cc
3: ee
/^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames /^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
aAz aAz
0: aAz 0: aAz
@ -12080,93 +11976,6 @@ No match
bnn bnn
0: bn 0: bn
# ---------------------
/(*LIMIT_MATCH=12bc)abc/
Failed: error 160 at offset 0: (*VERB) not recognized or malformed
/(*LIMIT_MATCH=4294967290)abc/
Failed: error 160 at offset 0: (*VERB) not recognized or malformed
/(*LIMIT_RECURSION=4294967280)abc/I
Capturing subpattern count = 0
Recursion limit = 4294967280
First code unit = 'a'
Last code unit = 'c'
Subject length lower bound = 3
/(a+)*zz/
aaaaaaaaaaaaaz
No match
aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -45: match limit exceeded
/(a+)*zz/
aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -50: recursion limit exceeded
/(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -45: match limit exceeded
aaaaaaaaaaaaaz\=match_limit=60000
Failed: error -45: match limit exceeded
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -45: match limit exceeded
/(*LIMIT_MATCH=60000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 60000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -45: match limit exceeded
/(*LIMIT_RECURSION=10)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 10
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
Failed: error -50: recursion limit exceeded
aaaaaaaaaaaaaz\=recursion_limit=1000
Failed: error -50: recursion limit exceeded
/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
/(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z
Last code unit = 'z'
Subject length lower bound = 2
aaaaaaaaaaaaaz
No match
aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -50: recursion limit exceeded
# This test causes a segfault with Perl 5.18.0 # This test causes a segfault with Perl 5.18.0
/^(?=(a)){0}b(?1)/ /^(?=(a)){0}b(?1)/