Skip to content

Commit add6949

Browse files
committed
Move 2 more tests
This movement affected the count in FINALE.
1 parent 629723c commit add6949

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

t/op/goto-amp-name.t

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ use warnings;
1111
use strict;
1212
use Config;
1313
#plan tests => 'no_plan'; # yet
14-
plan tests => 25;
14+
#plan tests => 25;
15+
plan tests => 27;
1516

1617
our $TODO;
1718

@@ -60,6 +61,26 @@ our $foo;
6061

6162
###################
6263

64+
# Test autoloading mechanism.
65+
66+
sub two {
67+
my ($pack, $file, $line) = caller; # Should indicate original call stats.
68+
is("@_ $pack $file $line", "1 2 3 main $::FILE $::LINE",
69+
'autoloading mechanism.');
70+
}
71+
72+
sub one {
73+
eval <<'END';
74+
no warnings 'redefine';
75+
sub one { pass('sub one'); goto &two; fail('sub one tail'); }
76+
END
77+
goto &one;
78+
}
79+
80+
$::FILE = __FILE__;
81+
$::LINE = __LINE__ + 1;
82+
&one(1,2,3);
83+
6384
# deep recursion with gotos eventually caused a stack reallocation
6485
# which messed up buggy internals that didn't expect the stack to move
6586

t/op/goto.t

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use warnings;
1313
use strict;
1414
use Config;
1515
#plan tests => 134;
16-
plan tests => 110;
16+
#plan tests => 110;
17+
plan tests => 108;
1718

1819
our $TODO;
1920

@@ -80,7 +81,7 @@ fail('goto bypass');
8081
exit;
8182

8283
FINALE:
83-
is(curr_test(), 20, 'FINALE');
84+
is(curr_test(), 18, 'FINALE');
8485

8586
# does goto LABEL handle block contexts correctly?
8687
# note that this scope-hopping differs from last & next,
@@ -328,26 +329,6 @@ bypass:
328329

329330
is(curr_test(), 9, 'eval "goto $x"');
330331

331-
# Test autoloading mechanism.
332-
333-
sub two {
334-
my ($pack, $file, $line) = caller; # Should indicate original call stats.
335-
is("@_ $pack $file $line", "1 2 3 main $::FILE $::LINE",
336-
'autoloading mechanism.');
337-
}
338-
339-
sub one {
340-
eval <<'END';
341-
no warnings 'redefine';
342-
sub one { pass('sub one'); goto &two; fail('sub one tail'); }
343-
END
344-
goto &one;
345-
}
346-
347-
$::FILE = __FILE__;
348-
$::LINE = __LINE__ + 1;
349-
&one(1,2,3);
350-
351332
{
352333
my $wherever = 'NOWHERE';
353334
eval { goto $wherever };

0 commit comments

Comments
 (0)