3 # $RCSfile: goto.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:56 $
5 # "This IS structured code. It's just randomly structured."
26 print "#1\t:$foo: == 2\n";
27 if ($foo == 2) {print "ok 1\n";} else {print "not ok 1\n";}
31 print "#2\t:$foo: == 4\n";
32 if ($foo == 4) {print "ok 2\n";} else {print "not ok 2\n";}
34 $x = `./perl -e 'goto foo;' 2>&1`;
35 if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. -e "goto foo;"`; }
37 if ($x =~ /label/) {print "ok 3\n";} else {print "not ok 3\n";}
64 # Test autoloading mechanism.
67 ($pack, $file, $line) = caller; # Should indicate original call stats.
68 print "@_ $pack $file $line" eq "1 2 3 main $FILE $LINE"
75 sub one { print "ok 6\n"; goto &two; print "not ok 6\n"; }
85 eval { goto $wherever };
86 print $@ =~ /Can't find label NOWHERE/ ? "ok 8\n" : "not ok 8\n";