Skip to content

Commit acf510e

Browse files
committed
Rename test file; update MANIFEST
Move one test block from op/goto.t to (renamed) op/goto-sub.t.
1 parent 914efad commit acf510e

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

MANIFEST

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6348,7 +6348,7 @@ t/op/getppid.t See if getppid works
63486348
t/op/glob.t See if <*> works
63496349
t/op/gmagic.t See if GMAGIC works
63506350
t/op/goto.t See if goto works
6351-
t/op/goto-amp-name.t See if goto &NAME works
6351+
t/op/goto-sub.t See if goto &NAME works
63526352
t/op/goto_xs.t See if "goto &sub" works on XSUBs
63536353
t/op/grent.t See if getgr*() functions work
63546354
t/op/grep.t See if grep() and map() work

t/op/goto-amp-name.t renamed to t/op/goto-sub.t

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BEGIN {
1010
use warnings;
1111
use strict;
1212
use Config;
13-
plan tests => 39;
13+
plan tests => 40;
1414

1515
# Excerpts from 'perldoc -f goto' as of perl-5.40.1 (Aug 2025)
1616
#
@@ -262,6 +262,14 @@ sub {
262262
like($r, qr/bar/, "goto &foo in warn");
263263
}
264264

265+
{
266+
sub TIESCALAR { bless [pop] }
267+
sub FETCH { $_[0][0] }
268+
tie my $t, "", sub { "cluck up porridge" };
269+
is eval { sub { goto $t }->() }//$@, 'cluck up porridge',
270+
'tied arg returning sub ref';
271+
}
272+
265273
# v5.31.3-198-gd2cd363728 broke this. goto &XS_sub wasn't restoring
266274
# cx->blk_sub.old_cxsubix. Would panic in pp_return
267275

t/op/goto.t

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BEGIN {
1212
use warnings;
1313
use strict;
1414
use Config;
15-
plan tests => 96;
15+
plan tests => 95;
1616

1717
our $TODO;
1818

@@ -573,12 +573,6 @@ like $@, qr/^Can't find label \0 at /, 'goto $x where $x begins with \0';
573573
eval { goto "\0" };
574574
like $@, qr/^Can't find label \0 at /, 'goto "\0"';
575575

576-
sub TIESCALAR { bless [pop] }
577-
sub FETCH { $_[0][0] }
578-
tie my $t, "", sub { "cluck up porridge" };
579-
is eval { sub { goto $t }->() }//$@, 'cluck up porridge',
580-
'tied arg returning sub ref';
581-
582576
TODO: {
583577
local $::TODO = 'RT #45091: goto in CORE::GLOBAL::exit unsupported';
584578
fresh_perl_is(<<'EOC', "before\ndie handler\n", {stderr => 1}, 'RT #45091: goto in CORE::GLOBAL::EXIT');

0 commit comments

Comments
 (0)