diff options
-rw-r--r-- | dist/Safe/t/safesort.t | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dist/Safe/t/safesort.t b/dist/Safe/t/safesort.t index 71d9a94fde..01bed36182 100644 --- a/dist/Safe/t/safesort.t +++ b/dist/Safe/t/safesort.t @@ -9,7 +9,7 @@ BEGIN { } use Safe 1.00; -use Test::More tests => 9; +use Test::More tests => 10; my $safe = Safe->new('PLPerl'); $safe->permit_only(qw(:default sort)); @@ -46,6 +46,11 @@ $@ = 42; $die_func->(); is $@, 42, 'successful closure call should not alter $@'; -ok !eval { $die_func->("died\n"); 1 }, 'should die'; -is $@, "died\n", '$@ should be set correctly'; - +{ + my $warns = 0; + local $SIG{__WARN__} = sub { $warns++ }; + ok !eval { $die_func->("died\n"); 1 }, 'should die'; + is $@, "died\n", '$@ should be set correctly'; + local $TODO = "Shouldn't warn"; + is $warns, 0; +} |