X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F55-yield-target.t;h=f927d20767d85689dd2bb31652861993f53497f7;hb=be6b08621dbc4952ff95e1b6e27c417cb8b7715f;hp=594a04be93aa1f815dff46f7d92d846608c43e54;hpb=1cac52223ba0983d5d4007ab608fe4ea645eb037;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/55-yield-target.t b/t/55-yield-target.t index 594a04b..f927d20 100644 --- a/t/55-yield-target.t +++ b/t/55-yield-target.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 18; -use Scope::Upper qw; +use Scope::Upper qw; my @res; @@ -63,7 +63,9 @@ is_deeply \@res, [ 15, 19 ], 'yield() in for () { ... }'; is $loop, 21, 'yield() exited while'; is_deeply \@res, [ 20, 23 ], 'yield() in while () { ... }'; -{ +SKIP: { + skip '"eval { $str =~ s/./die q[foo]/e }" breaks havoc on perl 5.8 and below' + => 1 if "$]" < 5.010; my $s = 'a'; local $@; eval { @@ -72,7 +74,7 @@ is_deeply \@res, [ 20, 23 ], 'yield() in while () { ... }'; my $err = $@; my $line = __LINE__-3; like $err, - qr/^yield\(\) cannot target a substitution context at \Q$0\E line $line/, + qr/^yield\(\) can't target a substitution context at \Q$0\E line $line/, 'yield() cannot exit subst'; }