From: Blair Zajac Date: Fri, 21 Sep 2001 15:13:04 +0000 (-0700) Subject: t/op/chdir.t won't pass on VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89eee1ed72235a40548c0e433602e92957338617;p=p5sagit%2Fp5-mst-13.2.git t/op/chdir.t won't pass on VMS Message-Id: <3BABBB70.55FD41DC@orcaware.com> p4raw-id: //depot/perl@12123 --- diff --git a/t/op/chdir.t b/t/op/chdir.t index 118895d..735d51f 100644 --- a/t/op/chdir.t +++ b/t/op/chdir.t @@ -11,7 +11,7 @@ BEGIN { use Cwd qw(abs_path cwd); use File::Spec::Functions qw(:DEFAULT splitdir); -use Test::More tests => 24; +use Test::More tests => 25; my $cwd = abs_path; @@ -35,24 +35,25 @@ foreach my $key (@magic_envs) { delete @ENV{@magic_envs}; local $ENV{$key} = catdir $cwd, 'op'; + # Make sure $ENV{'SYS$LOGIN'} is only honored on VMS. if( $key eq 'SYS$LOGIN' && $^O ne 'VMS' ) { - # Make sure $ENV{'SYS$LOGIN'} is only honored on VMS. - ok( !chdir(), "chdir() w/\$ENV{$key} set" ); - is( abs_path, $cwd, ' abs_path() agrees' ); + ok( !chdir(), "chdir() on $^O ignores only \$ENV{$key} set" ); + is( abs_path, $cwd, ' abs_path() did not change' ); + ok( 1, " no need to chdir back on $^O" ); } else { - ok( chdir(), "chdir() w/\$ENV{$key} set" ); + ok( chdir(), "chdir() w/ only \$ENV{$key} set" ); is( abs_path, $ENV{$key}, ' abs_path() agrees' ); chdir($cwd); is( abs_path, $cwd, ' and back again' ); } # Bug had chdir(undef) being the same as chdir() - ok( !chdir(undef), "chdir(undef) w/\$ENV{$key} set" ); + ok( !chdir(undef), "chdir(undef) w/ only \$ENV{$key} set" ); is( abs_path, $cwd, ' abs_path() agrees' ); # Ditto chdir(''). - ok( !chdir(''), "chdir('') w/\$ENV{$key} set" ); + ok( !chdir(''), "chdir('') w/ only \$ENV{$key} set" ); is( abs_path, $cwd, ' abs_path() agrees' ); }