summaryrefslogtreecommitdiff
path: root/t/op/magic.t
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2003-08-25 11:51:57 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-25 09:03:44 +0000
commitda51b73c5ae244acdcf78affd6c0b7179750d917 (patch)
treee575f4e428e2eaaf964d345ad7938a9487c27d48 /t/op/magic.t
parent0376ff3203a4077e20f8a8b62fb3a496c51bb88e (diff)
downloadperl-da51b73c5ae244acdcf78affd6c0b7179750d917.tar.gz
valgrind update
Message-ID: <21671.1061797917@www38.gmx.net> p4raw-id: //depot/perl@20872
Diffstat (limited to 't/op/magic.t')
-rwxr-xr-xt/op/magic.t20
1 files changed, 12 insertions, 8 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index f55630a823..74a8d25f90 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -267,14 +267,18 @@ if ($Is_VMS || $Is_Dos || $Is_MacOS) {
skip("%ENV manipulations fail or aren't safe on $^O") for 1..4;
}
else {
- $PATH = $ENV{PATH};
- $PDL = $ENV{PERL_DESTRUCT_LEVEL} || 0;
- $ENV{foo} = "bar";
- %ENV = ();
- $ENV{PATH} = $PATH;
- $ENV{PERL_DESTRUCT_LEVEL} = $PDL || 0;
- ok ($Is_MSWin32 ? (`set foo 2>NUL` eq "")
- : (`echo \$foo` eq "\n") );
+ if ($ENV{PERL_VALGRIND}) {
+ skip("clearing \%ENV is not safe when running under valgrind");
+ } else {
+ $PATH = $ENV{PATH};
+ $PDL = $ENV{PERL_DESTRUCT_LEVEL} || 0;
+ $ENV{foo} = "bar";
+ %ENV = ();
+ $ENV{PATH} = $PATH;
+ $ENV{PERL_DESTRUCT_LEVEL} = $PDL || 0;
+ ok ($Is_MSWin32 ? (`set foo 2>NUL` eq "")
+ : (`echo \$foo` eq "\n") );
+ }
$ENV{__NoNeSuCh} = "foo";
$0 = "bar";