summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-09-02 06:45:11 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-02 14:40:54 +0000
commitc7e45529067e5669196da1c88cb491070e8fe1ea (patch)
treee2d19bd7f4154ce402b79c558b1704046860e3f1 /t
parent1d2654e1d58ad544e6568f317af5402a9dbaff80 (diff)
downloadperl-c7e45529067e5669196da1c88cb491070e8fe1ea.tar.gz
Re: ByteLoader and MSWin32
Message-ID: <20030902004511.GA1442@ratsnest.hole> p4raw-id: //depot/perl@20993
Diffstat (limited to 't')
-rwxr-xr-xt/TEST18
1 files changed, 13 insertions, 5 deletions
diff --git a/t/TEST b/t/TEST
index 95869fbb48..58850606f8 100755
--- a/t/TEST
+++ b/t/TEST
@@ -246,9 +246,17 @@ EOT
or print "can't deparse '$deparse': $!.\n";
}
elsif ($type eq 'bytecompile') {
- my $perl = $ENV{PERL} || './perl';
- my $redir = ($^O eq 'VMS' ? '2>&1' : '');
- my $bswitch = "-MO=Bytecode,-H,-TI,-s`pwd`/$test,";
+ my ($pwd, $null);
+ if( $^O eq 'MSWin32') {
+ $pwd = `cd`;
+ $null = 'nul';
+ } else {
+ $pwd = `pwd`;
+ $null = '/dev/null';
+ }
+ chomp $pwd;
+ my $perl = $ENV{PERL} || "$pwd/perl";
+ my $bswitch = "-MO=Bytecode,-H,-TI,-s$pwd/$test,";
$bswitch .= "-TF$test.plc,"
if $test =~ m(chdir|pod/|CGI/t/carp|lib/DB);
$bswitch .= "-k,"
@@ -257,8 +265,8 @@ EOT
if $test =~ m(op/getpid);
my $bytecompile =
"$perl $testswitch $switch -I../lib $bswitch".
- "-o$test.plc $test 2>/dev/null &&".
- "$perl $testswitch $switch -I../lib $utf $test.plc $redir|";
+ "-o$test.plc $test 2>$null &&".
+ "$perl $testswitch $switch -I../lib $utf $test.plc |";
open(RESULTS,$bytecompile)
or print "can't byte-compile '$bytecompile': $!.\n";
}