use FindBin qw($Bin);
use Config;
use IPC::Open2;
+use File::Glob 'bsd_glob'; # support spaces in names unlike glob()
# rerun the tests under the assumption of pure-perl
my $this_file = quotemeta(__FILE__);
-my @tests = grep { $_ !~ /${this_file}$/ } glob("$Bin/*.t");
+my @tests = grep { $_ !~ /${this_file}$/ } bsd_glob("$Bin/*.t");
print "1..@{[ scalar @tests ]}\n";
+my $had_error = 0;
+END { $? = $had_error }
sub ok ($$) {
- print "not " if !$_[0];
+ $had_error++, print "not " if !$_[0];
print "ok";
print " - $_[1]" if defined $_[1];
print "\n";
wait;
ok (! $?, "Exit $? from: $^X $fn");
}
-