This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
die() no longer propagates outside of a Safe compartment
authorRafael Garcia-Suarez <rgs@consttype.org>
Tue, 4 May 2010 13:36:47 +0000 (15:36 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Tue, 4 May 2010 13:36:47 +0000 (15:36 +0200)
so mark the test for that as a TODO. We'll decide later what behaviour
is desirable here. Note that it warns instead.

dist/Safe/t/safesort.t

index 3396f1e..366358d 100644 (file)
@@ -49,6 +49,7 @@ is $@, 42, 'successful closure call should not alter $@';
 {
     my $warns = 0;
     local $SIG{__WARN__} = sub { $warns++ };
+    local $TODO = $] >= 5.013 ? "Doesn't die in 5.13" : undef;
     ok !eval { $die_func->("died\n"); 1 }, 'should die';
     is $@, "died\n", '$@ should be set correctly';
     local $TODO = "Shouldn't warn";