From: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date: Thu, 16 Mar 2006 16:17:38 +0000 (+0000)
Subject: Add a couple of regression tests for the untested
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=917949e3eede66c55d04d689749b55827e9f7fd3;p=p5sagit%2Fp5-mst-13.2.git

Add a couple of regression tests for the untested
"Bad name after %s" parsing error

p4raw-id: //depot/perl@27517
---

diff --git a/t/comp/parser.t b/t/comp/parser.t
index bbc3c83..0532ab3 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\'' );