From: Vincent Pit Date: Wed, 2 Jan 2013 00:22:27 +0000 (+0100) Subject: Skip 'yield to subst context' tests on perl 5.8 and below X-Git-Tag: v0.22~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=6c74fb492a0404fa8822211cba07b1027ce3cfec;p=perl%2Fmodules%2FScope-Upper.git Skip 'yield to subst context' tests on perl 5.8 and below The snippet : my $s = "foo"; eval { $s =~ s/./die "wut"/e }; qr/bar/; segfaults on a threaded, debugging and poisonous perl 5.8.9. Just to be safe, the relevant test won't be run before perl 5.10. --- diff --git a/t/55-yield-target.t b/t/55-yield-target.t index 46ea7f5..f927d20 100644 --- a/t/55-yield-target.t +++ b/t/55-yield-target.t @@ -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 { diff --git a/t/58-yield-misc.t b/t/58-yield-misc.t index ca6fda0..3243272 100644 --- a/t/58-yield-misc.t +++ b/t/58-yield-misc.t @@ -121,7 +121,9 @@ sub guard { VPIT::TestHelpers::Guard->new(sub { ++$destroyed }) } is "@res", '1 2 3 4', 'leave with arguments'; } -{ +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 {