diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-09-26 12:43:14 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-27 22:46:42 +0000 |
commit | 9d4c144b923f1296fc58dd2230c626ac46cfb312 (patch) | |
tree | 8b5444d81e4dfbd61b7d29b52ca3d2ed3ef33cce | |
parent | 16920d4e7955f05583cb8e0e238058b2a6125125 (diff) | |
download | perl-9d4c144b923f1296fc58dd2230c626ac46cfb312.tar.gz |
slightly less broken chdir.t for VMS
Message-Id: <5.1.0.14.0.20010926173048.01aac5b0@exchi01>
p4raw-id: //depot/perl@12252
-rw-r--r-- | iperlsys.h | 2 | ||||
-rw-r--r-- | t/op/chdir.t | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/iperlsys.h b/iperlsys.h index 298f82aecb..d3e82549b4 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -415,7 +415,7 @@ struct IPerlDirInfo #define PerlDir_mkdir(name, mode) Mkdir((name), (mode)) #ifdef VMS -# define PerlDir_chdir(n) Chdir(((n) && *(n)) ? (n) : "SYS$LOGIN") +# define PerlDir_chdir(n) Chdir((n)) #else # define PerlDir_chdir(name) chdir((name)) #endif diff --git a/t/op/chdir.t b/t/op/chdir.t index 23ac735cb6..8386df0d45 100644 --- a/t/op/chdir.t +++ b/t/op/chdir.t @@ -8,7 +8,7 @@ BEGIN { } require "test.pl"; -plan(tests => 25); +plan(tests => 31); my $IsVMS = $^O eq 'VMS'; @@ -19,14 +19,14 @@ use File::Spec::Functions qw(:DEFAULT splitdir rel2abs); # Can't use Cwd::abs_path() because it has different ideas about # path seperators than File::Spec. sub abs_path { - rel2abs(curdir); + $IsVMS ? uc(rel2abs(curdir)) : rel2abs(curdir); } my $Cwd = abs_path; # Let's get to a known position SKIP: { - skip("Already in t/", 2) if (splitdir(abs_path))[-1] eq 't'; + skip("Already in t/", 2) if (splitdir(abs_path))[-1] eq ($IsVMS ? 'T' : 't'); ok( chdir('t'), 'chdir("t")'); is( abs_path, catdir($Cwd, 't'), ' abs_path() agrees' ); @@ -84,14 +84,14 @@ foreach my $key (@magic_envs) { # We're going to be using undefs a lot here. no warnings 'uninitialized'; - local %ENV = (); - $ENV{$key} = catdir $Cwd, 'op'; + local %ENV = () if !$IsVMS; + $ENV{$key} = catdir $Cwd, ($IsVMS ? 'OP' : 'op'); check_env($key); } { - local %ENV = (); + local %ENV = () if !$IsVMS; ok( !chdir(), 'chdir() w/o any ENV set' ); is( abs_path, $Cwd, ' abs_path() agrees' ); |