]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/21-bad-use.t
Skip when we couldn't capture buffers
[perl/modules/indirect.git] / t / 21-bad-use.t
index 1499b2bf40147e571e7898e303a4edfea4c41869..5993d246d55e1cd214f009e2742d1229eb56c042 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;