Change 27517 by [EMAIL PROTECTED] on 2006/03/16 16:17:38

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

Affected files ...

... //depot/perl/t/comp/parser.t#20 edit

Differences ...

==== //depot/perl/t/comp/parser.t#20 (text) ====
Index: perl/t/comp/parser.t
--- perl/t/comp/parser.t#19~26070~      2005-11-10 01:11:26.000000000 -0800
+++ perl/t/comp/parser.t        2006-03-16 08:17:38.000000000 -0800
@@ -9,7 +9,7 @@
 }
 
 require "./test.pl";
-plan( tests => 56 );
+plan( tests => 58 );
 
 eval '[EMAIL PROTECTED];';
 like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '[EMAIL 
PROTECTED]' );
@@ -197,3 +197,9 @@
     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\'' );
End of Patch.

Reply via email to