shield t/test.pl functions from global print modifiers
[p5sagit/p5-mst-13.2.git] / t / base / lex.t
index 4166c18..f45e56c 100755 (executable)
@@ -1,13 +1,13 @@
 #!./perl
 
-print "1..54\n";
+print "1..56\n";
 
 $x = 'x';
 
 print "#1      :$x: eq :x:\n";
 if ($x eq 'x') {print "ok 1\n";} else {print "not ok 1\n";}
 
-$x = $#;       # this is the register $#
+$x = $#[0];
 
 if ($x eq '') {print "ok 2\n";} else {print "not ok 2\n";}
 
@@ -260,3 +260,10 @@ my $test = 52;
 print ((exists $str{foo}      ? "" : "not ")."ok $test\n"); ++$test;
 print ((exists $str{bar}      ? "" : "not ")."ok $test\n"); ++$test;
 print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test;
+
+sub foo::::::bar { print "ok $test\n"; $test++ }
+foo::::::bar;
+
+eval "\$x =\xE2foo";
+if ($@ =~ /Unrecognized character \\xE2 in column 5/) { print "ok $test\n"; } else { print "not ok $test\n"; }
+$test++;