X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-scope.t;h=0174870ddbdf712bedf5669bf0af6ba36c4ed562;hb=b78d08a728ad517a03a0b7302f45201964654488;hp=eafc59c67b466d7258e7517b1a8bd8fccca7138f;hpb=79fe38872567977419089da38eac9406bf2d4afa;p=perl%2Fmodules%2Findirect.git diff --git a/t/30-scope.t b/t/30-scope.t index eafc59c..0174870 100644 --- a/t/30-scope.t +++ b/t/30-scope.t @@ -3,12 +3,9 @@ use strict; use warnings; -my $total; -BEGIN { - $total = 8; -} +my $total = 8; -use Test::More tests => $total + 1; +use Test::More; use IPC::Cmd qw/run/; @@ -19,11 +16,16 @@ use IPC::Cmd qw/run/; '-c', 't/data/mixed.d' ]; + +plan skip_all => "Couldn't capture buffers" if $success and not defined $stderr; +plan tests => $total + 1; + +$stderr = join '', @$stderr; unless ($success) { - $stderr = pop @$stderr if ref $stderr eq 'ARRAY'; - BAIL_OUT("Failed to execute data file (error $err_code) : $stderr"); + diag $stderr; + diag "Failed to execute data file (error $err_code)"; + fail "Couldn't run test $_" for 1 .. $total + 1; } -$stderr = join "\n", @$stderr if ref $stderr eq 'ARRAY'; my %fail = map { $_ => 1 } 2, 3, 5, 7; my %failed;