]> git.vpit.fr Git - perl/modules/VPIT-TestHelpers.git/blobdiff - t/30-run_perl.t
Forbid double quotes in code run by run_perl()
[perl/modules/VPIT-TestHelpers.git] / t / 30-run_perl.t
index 216519706e134bca5ba807614a005c140dc974ad..077b58e598650ac385931e7602df61bc76b95e66 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use VPIT::TestHelpers;
 
-use Test::More tests => 5;
+use Test::More tests => 5 + 1;
 
 use Config;
 use File::Temp;
@@ -66,3 +66,12 @@ for my $os (qw<MSWin32 android darwin cygwin linux>) {
 
  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';
+}