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 $PERL = ($^O eq 'MSWin32') ? '.\perl' : './perl';
35 $x = `$PERL -e "goto foo;" 2>&1`;
36 if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. -e "goto foo;"`; }
38 if ($x =~ /label/) {print "ok 3\n";} else {print "not ok 3\n";}
65 # Test autoloading mechanism.
68 ($pack, $file, $line) = caller; # Should indicate original call stats.
69 print "@_ $pack $file $line" eq "1 2 3 main $FILE $LINE"
76 sub one { print "ok 6\n"; goto &two; print "not ok 6\n"; }
86 eval { goto $wherever };
87 print $@ =~ /Can't find label NOWHERE/ ? "ok 8\n" : "not ok 8\n";