chdir.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl -w
BEGIN {
# We're not going to chdir() into 't' because we don't know if
# chdir() works! Instead, we'll hedge our bets and put both
# possibilities into @INC.
}
use Config;
require "test.pl";
# 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.
# Can't use Cwd::abs_path() because it has different ideas about
# path separators than File::Spec.
sub abs_path {
$d;
}
# Let's get to a known position
SKIP: {
}
# The environment variables chdir() pays attention to.
sub check_env {
# Make sure $ENV{'SYS$LOGIN'} is only honored on VMS.
}
else {
# Check the deprecated chdir(undef) feature.
#line 64
Use of uninitialized value in chdir at $0 line 64.
Use of chdir('') or chdir(undef) as chdir() is deprecated at $0 line 64.
WARNING
# Ditto chdir('').
#line 76
Use of chdir('') or chdir(undef) as chdir() is deprecated at $0 line 76.
WARNING
}
}
sub clean_env {
$Saved_Env{$env} = $ENV{$env};
# Can't actually delete SYS$ stuff on VMS.
# On VMS, %ENV is many layered.
}
}
# The following means we won't really be testing for non-existence,
# but in Perl we can only delete from the process table, not the job
# table.
}
END {
# Restore the environment for VMS (and doesn't hurt for anyone else)
@ENV{@magic_envs} = @Saved_Env{@magic_envs};
}
# We're going to be using undefs a lot here.
}
{
} else {
}
}