summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/toke27
-rw-r--r--t/re/re_tests1
2 files changed, 28 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index 7d66ab6d25..1817d86e18 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -1306,3 +1306,30 @@ sub { # do not actually call require
require a::b + 1; # ambiguity warnings.
}
EXPECT
+########
+# toke.c
+# [perl #XXX] Erroneous ambiguity warnings
+print "aa" =~ m{^a\{1,2\}$}, "\n";
+print "aa" =~ m{^a\x\{61\}$}, "\n";
+print "aa" =~ m{^a{1,2}$}, "\n";
+print "aq" =~ m[^a\[a-z\]$], "\n";
+print "aq" =~ m(^a\(q\)$), "\n";
+no warnings 'deprecated';
+print "aa" =~ m{^a\{1,2\}$}, "\n";
+print "aa" =~ m{^a\x\{61\}$}, "\n";
+print "aq" =~ m[^a\[a-z\]$], "\n";
+print "aq" =~ m(^a\(q\)$), "\n";
+EXPECT
+Useless use of '\'; doesn't escape metacharacter '{' at - line 3.
+Useless use of '\'; doesn't escape metacharacter '{' at - line 4.
+Useless use of '\'; doesn't escape metacharacter '[' at - line 6.
+Useless use of '\'; doesn't escape metacharacter '(' at - line 7.
+1
+1
+1
+1
+q
+1
+1
+1
+q
diff --git a/t/re/re_tests b/t/re/re_tests
index e2a7e890c4..c41d529f8f 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1730,5 +1730,6 @@ ab[c\\\](??{"x"})]{3}d ab\\](d y - -
\Vn \xFFn/ y $& \xFFn
/(?l:a?\w)/ b y $& b
+m?^xy\?$? xy? y $& xy?
# vim: softtabstop=0 noexpandtab