]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/20-bad-no.t
Skip when we couldn't capture buffers
[perl/modules/indirect.git] / t / 20-bad-no.t
index 0980b1fdabca524b181c420f024c4befc567738b..a5dfd2a20d8fe1493dacadc3b93eb923f0a668fe 100644 (file)
@@ -3,12 +3,9 @@
 use strict;
 use warnings;
 
-my $total;
-BEGIN {
- $total = 28;
-}
+my $total = 28;
 
-use Test::More tests => $total + 1;
+use Test::More;
 
 use IPC::Cmd qw/run/;
 
@@ -20,6 +17,10 @@ use IPC::Cmd qw/run/;
           '-c',
           't/data/bad.d'
    ];
+
+plan skip_all => "Couldn't capture buffers" if $success and not defined $stderr;
+plan tests => $total + 1;
+
 $stderr = join '', @$stderr;
 unless ($success) {
  diag $stderr;