Fix and test for [perl #15549 Empty \Q\E not permitted]
[p5sagit/p5-mst-13.2.git] / t / comp / script.t
index d70b767..6efffdf 100755 (executable)
@@ -3,10 +3,10 @@
 BEGIN {
     chdir 't';
     @INC = '../lib';
-    require './test.pl';
+    require './test.pl';       # for which_perl() etc
 }
 
-my $Perl = which_perl;
+my $Perl = which_perl();
 
 print "1..3\n";
 
@@ -16,7 +16,7 @@ if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
 
 open(try,">Comp.script") || (die "Can't open temp file.");
 print try 'print "ok\n";'; print try "\n";
-close try;
+close try or die "Could not close: $!";
 
 $x = `$Perl Comp.script`;