X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F22-bad-fatal.t;h=e374a8df8cd0fcf01fd88d2ab182e83b30c0cbf9;hb=1d3c3341b0d1f0192c3189d47a5b8bc78176e9db;hp=6fd910a4a6c3d1d5e87360c39723d0363c3b8130;hpb=79fe38872567977419089da38eac9406bf2d4afa;p=perl%2Fmodules%2Findirect.git diff --git a/t/22-bad-fatal.t b/t/22-bad-fatal.t index 6fd910a..e374a8d 100644 --- a/t/22-bad-fatal.t +++ b/t/22-bad-fatal.t @@ -3,12 +3,7 @@ use strict; use warnings; -my $total; -BEGIN { - $total = 20; -} - -use Test::More tests => 1; +use Test::More; use IPC::Cmd qw/run/; @@ -21,5 +16,8 @@ use IPC::Cmd qw/run/; 't/data/bad.d' ]; -$stderr = join "\n", @$stderr if ref $stderr eq 'ARRAY'; +plan skip_all => "Couldn't capture buffers" if $success and not defined $stderr; +plan tests => 1; + +$stderr = join '', @$stderr; ok(!$success && $err_code && $stderr =~ /^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"Hlagh1"/mg, 'croak when :fatal is specified');