blob: 191571015c51ea226dec67cada3cb27cfbd9555c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!./perl
print "1..6\n";
eval 'print "ok 1\n";';
if ($@ eq '') {print "ok 2\n";} else {print "not ok 2\n";}
eval "\$foo\n = # this is a comment\n'ok 3';";
print $foo,"\n";
eval "\$foo\n = # this is a comment\n'ok 4\n';";
print $foo;
eval '
$foo ='; # this tests for a call through yyerror()
if ($@ =~ /line 2/) {print "ok 5\n";} else {print "not ok 5\n";}
eval '$foo = /'; # this tests for a call through fatal()
if ($@ =~ /Search/) {print "ok 6\n";} else {print "not ok 6\n";}
|