From: H.Merijn Brand Date: Thu, 10 Feb 2005 14:19:51 +0000 (+0000) Subject: Swap logic in BEGIN blocks to have Cwd's abs_path do the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ced0984df55ae722e218b1b2dfc5f53d6b3a8473;p=p5sagit%2Fp5-mst-13.2.git Swap logic in BEGIN blocks to have Cwd's abs_path do the translation *before* the chdir (), so it now DTRT p4raw-id: //depot/perl@23957 --- diff --git a/lib/IPC/Run/t/adopt.t b/lib/IPC/Run/t/adopt.t index 9fd1303..7458758 100644 --- a/lib/IPC/Run/t/adopt.t +++ b/lib/IPC/Run/t/adopt.t @@ -8,11 +8,11 @@ adopt.t - Test suite for IPC::Run::adopt BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/binmode.t b/lib/IPC/Run/t/binmode.t index 1038a7d..cbfca0f 100644 --- a/lib/IPC/Run/t/binmode.t +++ b/lib/IPC/Run/t/binmode.t @@ -8,11 +8,11 @@ binary.t - Test suite for IPC::Run binary functionality BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/bogus.t b/lib/IPC/Run/t/bogus.t index 7718331..176315b 100644 --- a/lib/IPC/Run/t/bogus.t +++ b/lib/IPC/Run/t/bogus.t @@ -8,11 +8,11 @@ bogus.t - test bogus file cases. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/filter.t b/lib/IPC/Run/t/filter.t index 6242ef0..90126df 100644 --- a/lib/IPC/Run/t/filter.t +++ b/lib/IPC/Run/t/filter.t @@ -8,11 +8,11 @@ filter.t - Test suite for IPC::Run filter scaffolding BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/harness.t b/lib/IPC/Run/t/harness.t index 7823383..e42ee18 100644 --- a/lib/IPC/Run/t/harness.t +++ b/lib/IPC/Run/t/harness.t @@ -8,11 +8,11 @@ harness.t - Test suite for IPC::Run::harness BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/io.t b/lib/IPC/Run/t/io.t index 8e656fb..56a5c6f 100644 --- a/lib/IPC/Run/t/io.t +++ b/lib/IPC/Run/t/io.t @@ -8,11 +8,11 @@ io.t - Test suite excercising IPC::Run::IO with IPC::Run::run. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/kill_kill.t b/lib/IPC/Run/t/kill_kill.t index cebdbe0..cec0f6a 100644 --- a/lib/IPC/Run/t/kill_kill.t +++ b/lib/IPC/Run/t/kill_kill.t @@ -8,11 +8,11 @@ kill_kill.t - Test suite IPC::Run->kill_kill BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/parallel.t b/lib/IPC/Run/t/parallel.t index fac47b1..d178247 100644 --- a/lib/IPC/Run/t/parallel.t +++ b/lib/IPC/Run/t/parallel.t @@ -8,11 +8,11 @@ parallel.t - Test suite for running multiple processes in parallel. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/pty.t b/lib/IPC/Run/t/pty.t index 070767b..83ad5be 100644 --- a/lib/IPC/Run/t/pty.t +++ b/lib/IPC/Run/t/pty.t @@ -25,11 +25,11 @@ further, but I have not the time. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/pump.t b/lib/IPC/Run/t/pump.t index 12a8284..7878d78 100644 --- a/lib/IPC/Run/t/pump.t +++ b/lib/IPC/Run/t/pump.t @@ -8,11 +8,11 @@ pump.t - Test suite for IPC::Run::run, etc. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/run.t b/lib/IPC/Run/t/run.t index 7151222..130a18c 100644 --- a/lib/IPC/Run/t/run.t +++ b/lib/IPC/Run/t/run.t @@ -8,11 +8,11 @@ run.t - Test suite for IPC::Run::run, etc. BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/signal.t b/lib/IPC/Run/t/signal.t index 4ce2b87..399bd52 100644 --- a/lib/IPC/Run/t/signal.t +++ b/lib/IPC/Run/t/signal.t @@ -8,11 +8,11 @@ signal.t - Test suite IPC::Run->signal BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/timeout.t b/lib/IPC/Run/t/timeout.t index 82e96b1..394f109 100644 --- a/lib/IPC/Run/t/timeout.t +++ b/lib/IPC/Run/t/timeout.t @@ -8,11 +8,11 @@ timeout.t - Test suite for IPC::Run timeouts BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/timer.t b/lib/IPC/Run/t/timer.t index e777fd9..85ab5cb 100644 --- a/lib/IPC/Run/t/timer.t +++ b/lib/IPC/Run/t/timer.t @@ -8,11 +8,11 @@ timer.t - Test suite for IPC::Run::Timer BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } } diff --git a/lib/IPC/Run/t/win32_compile.t b/lib/IPC/Run/t/win32_compile.t index e556498..a71a377 100644 --- a/lib/IPC/Run/t/win32_compile.t +++ b/lib/IPC/Run/t/win32_compile.t @@ -8,11 +8,11 @@ win32_compile.t - See if IPC::Run::Win32Helper compiles, even on Unix BEGIN { if( $ENV{PERL_CORE} ) { - chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; - unshift @INC, 'lib', '../..'; use Cwd; $^X = Cwd::abs_path($^X); $^X = qq("$^X") if $^X =~ /\s/; + chdir '../lib/IPC/Run' if -d '../lib/IPC/Run'; + unshift @INC, 'lib', '../..'; } }