unless(grep /blib/, @INC) {
chdir 't' if -d 't';
@INC = '../lib';
+ require './test.pl';
}
$SIG{__WARN__} = sub { push @WARN, @_ };
}
+require File::Spec;
+
$| = 1;
print "1..73\n";
# ---- Alias extensions
my $tmpfile = "tmp0000";
-my $alifile = "../lib/unicore/xyzzy_alias.pl";
+my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore xyzzy_alias.pl));
my $i = 0;
1 while -e ++$tmpfile;
END { if ($tmpfile) { 1 while unlink $tmpfile; } }
print $ali $fil;
close $ali or die "Could not close $alifile: $!";
}
- my $res =
- $^O eq "MSWin32" ? `.\\perl -I../lib $switch $tmpfile 2>&1` :
- $^O eq "NetWare" ? `perl -I../lib $switch $tmpfile 2>&1` :
- $^O eq "MacOS" ? `$^X -I::lib -MMac::err=unix $switch $tmpfile` :
- `./perl -I. -I../lib $switch $tmpfile 2>&1`;
+ my $res = runperl( switches => $switch,
+ progfile => $tmpfile,
+ stderr => 1 );
my $status = $?;
$res =~ s/[\r\n]+$//;
$res =~ s/tmp\d+/-/g; # fake $prog from STDIN