summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-16 16:17:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-16 16:17:38 +0000
commit917949e3eede66c55d04d689749b55827e9f7fd3 (patch)
tree3e1464f58ea15641100e561242f0d0eb5d236830 /t
parentcb7abd7f1d4048e97e3364ad103a4806dcf94905 (diff)
downloadperl-917949e3eede66c55d04d689749b55827e9f7fd3.tar.gz
Add a couple of regression tests for the untested
"Bad name after %s" parsing error p4raw-id: //depot/perl@27517
Diffstat (limited to 't')
-rw-r--r--t/comp/parser.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t
index bbc3c837cd..0532ab3ba2 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -9,7 +9,7 @@ BEGIN {
}
require "./test.pl";
-plan( tests => 56 );
+plan( tests => 58 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
@@ -197,3 +197,9 @@ EOF
like($@, qr/That use of \$\[ is unsupported/,
'cannot assign list of <1 elements to $[');
}
+
+# tests for "Bad name"
+eval q{ foo::$bar };
+like( $@, qr/Bad name after foo::/, 'Bad name after foo::' );
+eval q{ foo''bar };
+like( $@, qr/Bad name after foo'/, 'Bad name after foo\'' );