X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-run_perl.t;h=2238fb76838cf0f79e8d87d7f35237a16e7a5071;hb=274ec39542b4a7f51a3dd39cd3e9e5dd1ee88eb8;hp=216519706e134bca5ba807614a005c140dc974ad;hpb=3c878c7cab4d3a227bd77d1fe1fbdec19b2af8ce;p=perl%2Fmodules%2FVPIT-TestHelpers.git diff --git a/t/30-run_perl.t b/t/30-run_perl.t index 2165197..2238fb7 100644 --- a/t/30-run_perl.t +++ b/t/30-run_perl.t @@ -3,9 +3,9 @@ use strict; use warnings; -use VPIT::TestHelpers; +use VPIT::TestHelpers 'run_perl' => [ 'VTH' ]; -use Test::More tests => 5; +use Test::More tests => 5 + 2; use Config; use File::Temp; @@ -66,3 +66,17 @@ for my $os (qw) { is $got, $exp, "run_perl preserving $os ENV vars"; } + +{ + local $@; + eval { + run_perl 'print "hello\n"'; + }; + like $@, qr/^Double quotes in evaluated code are not portable/, + 'croak on double quotes'; +} + +{ + my $msg = VTH_RUN_PERL_FAILED; + like $msg, qr/^Could not execute/, 'RUN_PERL_FAILED error message'; +}