]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/22-bad-fatal.t
Skip when we couldn't capture buffers
[perl/modules/indirect.git] / t / 22-bad-fatal.t
index 64348d91cc0384e91add4ac53f3fc9fc8360d91f..e374a8df8cd0fcf01fd88d2ab182e83b30c0cbf9 100644 (file)
@@ -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'
    ];
 
+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');