X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-scope.t;h=2eceddb401b03cb92981e3763ee0c5d3401515b5;hb=93e46f6f746b5a546672c36dc0608aa035abee37;hp=f006f8147a699764b0432e14b764fc2c2d3effaa;hpb=c579771bace4977e6f2c26a5e5e29740a1aa4553;p=perl%2Fmodules%2Findirect.git diff --git a/t/30-scope.t b/t/30-scope.t index f006f81..2eceddb 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/; @@ -16,14 +13,20 @@ use IPC::Cmd qw/run/; = run command => [ $^X, map('-I' . $_, @INC), + $ENV{PERL5OPT} || '', '-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) { diag $stderr; diag "Failed to execute data file (error $err_code)"; fail "Couldn't run test $_" for 1 .. $total + 1; + exit $total + 1; } my %fail = map { $_ => 1 } 2, 3, 5, 7;