diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-12-06 17:45:44 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-07 03:05:38 +0000 |
commit | b5fe401bfa4db89e5f67b4efa27cfb15826a0dcc (patch) | |
tree | 6b62dc61e7583356a0d8ed4b8f4f31730ce1e7e9 /t/comp/script.t | |
parent | 394e6ffb59de984c27a7dce4842d9c594c141888 (diff) | |
download | perl-b5fe401bfa4db89e5f67b4efa27cfb15826a0dcc.tar.gz |
which_perl for safer $^Xing
Message-ID: <20011207034544.GN22648@blackrider>
(plus op/ref tweak)
p4raw-id: //depot/perl@13506
Diffstat (limited to 't/comp/script.t')
-rwxr-xr-x | t/comp/script.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/comp/script.t b/t/comp/script.t index f925b59727..d70b767478 100755 --- a/t/comp/script.t +++ b/t/comp/script.t @@ -1,8 +1,16 @@ #!./perl +BEGIN { + chdir 't'; + @INC = '../lib'; + require './test.pl'; +} + +my $Perl = which_perl; + print "1..3\n"; -$x = `$^X -le "print 'ok';"`; +$x = `$Perl -le "print 'ok';"`; if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";} @@ -10,11 +18,11 @@ open(try,">Comp.script") || (die "Can't open temp file."); print try 'print "ok\n";'; print try "\n"; close try; -$x = `$^X Comp.script`; +$x = `$Perl Comp.script`; if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";} -$x = `$^X <Comp.script`; +$x = `$Perl <Comp.script`; if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";} |