X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F61-uplevel-args.t;h=8a81c21cc17864206acd6e8613982d3e1c7d15b7;hb=c6e995c68b5384510061cde2d433e9506a3935f5;hp=a1a72fd0498f01089a4e5af93e86a7ff03c00344;hpb=52e46d61da554bbc0d80d317e07176bb730f3efb;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/61-uplevel-args.t b/t/61-uplevel-args.t index a1a72fd..8a81c21 100644 --- a/t/61-uplevel-args.t +++ b/t/61-uplevel-args.t @@ -147,7 +147,17 @@ sub { # goto -{ +SKIP: { + if ("$]" < 5.008) { + my $cb = sub { fail 'should not be executed' }; + local $@; + eval { sub { uplevel { goto $cb } HERE }->() }; + like $@, qr/^uplevel\(\) can't execute code that calls goto before perl 5\.8/, + 'goto croaks'; + skip "goto to an uplevel'd stack frame does not work on perl 5\.6" + => ((5 * 4 * 4) * 3 + 1) - 1; + } + my @args = ( [ [ ], [ 'm' ] ], [ [ 'a' ], [ ] ], @@ -225,7 +235,10 @@ sub { # goto XS -{ +SKIP: { + skip "goto to an uplevel'd stack frame does not work on perl 5\.6" => 5 + if "$]" < 5.008; + my $desc = 'uplevel() calling goto &uplevel'; local $@; eval {