summaryrefslogtreecommitdiff
path: root/t/re
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2013-06-12 21:03:50 +0200
committerYves Orton <demerphq@gmail.com>2013-06-12 21:20:33 +0200
commitb75763d608047188e76fcf5249a427b3ad13e87a (patch)
tree40a79acc590d5a7aac882ebebadeb7f1612d6002 /t/re
parentd7bfa5540b75a5472143ac2ff07153f261b4b075 (diff)
downloadperl-b75763d608047188e76fcf5249a427b3ad13e87a.tar.gz
do not warn when optimizing away /x{0,0}?+/ and /x{0,0}+/
In c37d14f947f7998211b0455e453160fb7e15b22e Karl fixed an issue reported in [perl #118375] "5.18 regex regression Quantifier follows nothing in regex" but he fixed only the non-greedy modifier mentioned in the ticket, and did not include support for the other quantifier modifiers like the non-greedy possessive (stupid but not illegal), and the possessive (useful) modifiers. Hopefully this covers them all. Note that because Karl already included support for m/x {0,0} ?/x I have done so as well for the new cases. I do not necessarily endorse the idea that it is legal or should be tested for. I am inclined to think that '{0,0}?+' should be indivisible even under /x.
Diffstat (limited to 't/re')
-rw-r--r--t/re/re_tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/re/re_tests b/t/re/re_tests
index ae28e141e1..45018df71b 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1744,4 +1744,10 @@ m?^xy\?$? xy? y $& xy?
/(a|(bc)){0,0}?xyz/ xyz y $& xyz
/( a | ( bc ) ) {0,0} ? xyz/x xyz y $& xyz
+/(a|(bc)){0,0}+xyz/ xyz y $& xyz
+/( a | ( bc ) ) {0,0} + xyz/x xyz y $& xyz
+
+/(a|(bc)){0,0}?xyz/ xyz y $& xyz
+/( a | ( bc ) ) {0,0} ? + xyz/x xyz y $& xyz
+
# vim: softtabstop=0 noexpandtab