Skip to content

Commit

Permalink
Most magic.t tests can actually run on VMS.
Browse files Browse the repository at this point in the history
Only the one that clears %ENV is a problem.
  • Loading branch information
craigberry committed Jul 31, 2012
1 parent bf1be22 commit f8c6801
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions t/op/magic.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,19 @@ sub env_is {
# cmd.exe will echo 'variable=value' but 4nt will echo just the value
# -- Nikola Knezevic
like `set $key`, qr/^(?:\Q$key\E=)?\Q$val\E$/, $desc;
} elsif ($Is_VMS) {
is `write sys\$output f\$trnlnm("\Q$key\E")`, "$val\n", $desc;
} else {
is `echo \$\Q$key\E`, "$val\n", $desc;
}
}

END {
# On VMS, environment variable changes are peristent after perl exits
delete $ENV{'FOO'} if $Is_VMS;
if ($Is_VMS) {
delete $ENV{'FOO'};
delete $ENV{'__NoNeSuCh'};
}
}

eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval
Expand Down Expand Up @@ -596,11 +601,11 @@ SKIP: {

SKIP: {
skip("%ENV manipulations fail or aren't safe on $^O", 19)
if $Is_VMS || $Is_Dos;
if $Is_Dos;

SKIP: {
skip("clearing \%ENV is not safe when running under valgrind")
if $ENV{PERL_VALGRIND};
skip("clearing \%ENV is not safe when running under valgrind or on VMS")
if $ENV{PERL_VALGRIND} || $Is_VMS;

$PATH = $ENV{PATH};
$PDL = $ENV{PERL_DESTRUCT_LEVEL} || 0;
Expand Down

0 comments on commit f8c6801

Please sign in to comment.