require "test.pl";
plan(tests => 31);
-my $IsVMS = $^O eq 'VMS';
+my $IsVMS = $^O eq 'VMS';
+my $IsMacOS = $^O eq 'MacOS';
# Might be a little early in the testing process to start using these,
# but I can't think of a way to write this test without them.
my($key) = @_;
# Make sure $ENV{'SYS$LOGIN'} is only honored on VMS.
- if( $key eq 'SYS$LOGIN' && !$IsVMS ) {
+ if( $key eq 'SYS$LOGIN' && !$IsVMS && !$IsMacOS ) {
ok( !chdir(), "chdir() on $^O ignores only \$ENV{$key} set" );
is( abs_path, $Cwd, ' abs_path() did not change' );
pass( " no need to test SYS\$LOGIN on $^O" ) for 1..7;
next if $IsVMS && $env eq 'SYS$LOGIN';
next if $IsVMS && $env eq 'HOME' && !$Config{'d_setenv'};
- # On VMS, %ENV is many layered.
- delete $ENV{$env} while exists $ENV{$env};
+ unless ($IsMacOS) { # ENV on MacOS is "special" :-)
+ # On VMS, %ENV is many layered.
+ delete $ENV{$env} while exists $ENV{$env};
+ }
}
# The following means we won't really be testing for non-existence,
{
clean_env;
- if ($IsVMS && !$Config{'d_setenv'}) {
+ if (($IsVMS || $IsMacOS) && !$Config{'d_setenv'}) {
pass("Can't reset HOME, so chdir() test meaningless");
} else {
ok( !chdir(), 'chdir() w/o any ENV set' );