X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVPIT-TestHelpers.git;a=blobdiff_plain;f=t%2F30-run_perl.t;h=21837bed3fe8cde3b441645fcc3a2ae1f05ce036;hp=bfc7bbb7fa477dab0bba34dc76a3b788e2d02c7c;hb=32b272838d5cd4620aec5d8b2c6d2fea43e8e0a9;hpb=9d12e1a9b21a372b49301b11df9b0720ba484ef4 diff --git a/t/30-run_perl.t b/t/30-run_perl.t index bfc7bbb..21837be 100644 --- a/t/30-run_perl.t +++ b/t/30-run_perl.t @@ -5,7 +5,7 @@ use warnings; use VPIT::TestHelpers 'run_perl' => [ 'VTH' ]; -use Test::More tests => 5 + 2; +use Test::More tests => 5 + 2 + 2; use Config; use File::Temp; @@ -71,6 +71,16 @@ for my $os (qw) { is $got, $exp, "run_perl preserving $os ENV vars"; } +{ + local $@; + my $stat = eval { + run_perl_file 't/testcases/run_perl_file.pl'; + }; + $stat = $stat >> 8 if defined $stat; + is $@, '', 'run_perl_file() does not croak'; + is $stat, 123, 'run_perl_file() captures the exit value'; +} + { local $@; eval {