X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbase%2Flex.t;h=f45e56cdf7f71016957e49652d8c0c4a2e351b6e;hb=3d66076ad00dfe06380fb774b92fb59dc07fe4ec;hp=54d6c93c5edfc5d6511c25a0379a213b60846ad3;hpb=766c8ce88b2ab44ae7abe43697bdf840efbf3085;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/base/lex.t b/t/base/lex.t index 54d6c93..f45e56c 100755 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -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";} @@ -53,8 +53,8 @@ $foo EOF EOE -print <<`EOS` . <<\EOF; -echo ok 12 +print <<'EOS' . <<\EOF; +ok 12 - make sure single quotes are honored \nnot ok EOS ok 13 EOF @@ -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++;