From: Vincent Pit Date: Sun, 18 Apr 2010 20:53:42 +0000 (+0200) Subject: Fix test failures with 5.12 on Windows where Strawberry Perl crashes because the... X-Git-Tag: v0.20~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ca6c9d6f907915ef07a55bd86e0b1333cc8ac649;p=perl%2Fmodules%2Findirect.git Fix test failures with 5.12 on Windows where Strawberry Perl crashes because the SystemRoot environment variable is missing --- diff --git a/t/41-threads-teardown.t b/t/41-threads-teardown.t index d8a6fc9..b2186e8 100644 --- a/t/41-threads-teardown.t +++ b/t/41-threads-teardown.t @@ -31,7 +31,10 @@ BEGIN { sub run_perl { my $code = shift; + my $SystemRoot = $ENV{SystemRoot}; local %ENV; + $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot; + system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code; } diff --git a/t/80-regressions.t b/t/80-regressions.t index 19a6693..e717bdf 100644 --- a/t/80-regressions.t +++ b/t/80-regressions.t @@ -10,7 +10,10 @@ BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } sub run_perl { my $code = shift; + my $SystemRoot = $ENV{SystemRoot}; local %ENV; + $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot; + system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code; }