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 =~ /label/) {print "ok 3\n";} else {print "not ok 3\n";}
62 # Test autoloading mechanism.
65 ($pack, $file, $line) = caller; # Should indicate original call stats.
66 print "@_ $pack $file $line" eq "1 2 3 main $FILE $LINE"
73 sub one { print "ok 6\n"; goto &two; print "not ok 6\n"; }
83 eval { goto $wherever };
84 print $@ =~ /Can't find label NOWHERE/ ? "ok 8\n" : "not ok 8\n";