summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-05-24 13:25:17 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-26 20:31:56 +0000
commit971ecbe6f2aaf71c3a71c08000760f3d4f9bf287 (patch)
tree0d5b7c3552b5eef74a10c429a12a76ffe69c3ce3 /t/op
parent48dc1ee65779dbdc177bc16530afd4f43c1c0ecf (diff)
downloadperl-971ecbe6f2aaf71c3a71c08000760f3d4f9bf287.tar.gz
Re: [perl #22299] goto doesn't find label
Date: Sat, 24 May 2003 12:25:17 +0100 Message-ID: <20030524112517.GA11761@fdgroup.com> Subject: [PATCH] Re: [perl #22299] goto doesn't find label From: Dave Mitchell <davem@fdgroup.com> Date: Mon, 26 May 2003 13:47:11 +0100 Message-ID: <20030526124710.GA17670@fdgroup.com> p4raw-id: //depot/perl@19625
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/goto.t27
1 files changed, 26 insertions, 1 deletions
diff --git a/t/op/goto.t b/t/op/goto.t
index 8a39d9a60c..c156fd8440 100755
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -2,7 +2,14 @@
# "This IS structured code. It's just randomly structured."
-print "1..29\n";
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = qw(. ../lib);
+}
+
+print "1..30\n";
+
+require "test.pl";
while ($?) {
$foo = 1;
@@ -196,6 +203,24 @@ for ($i=0; $i<2; $i++) {
}
print "ok 29 - goto in for(;;) with continuation\n";
+# bug #22299 - goto in require doesn't find label
+
+open my $f, ">goto01.pm" or die;
+print $f <<'EOT';
+package goto01;
+goto YYY;
+die;
+YYY: print "OK\n";
+1;
+EOT
+close $f;
+
+curr_test(30);
+my $r = runperl(prog => 'use goto01; print qq[DONE\n]');
+is($r, "OK\nDONE\n", "goto within use-d file");
+unlink "goto01.pm";
+
+
exit;
bypass: