diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-20 00:37:46 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-20 00:37:46 +0000 |
commit | 1cf742e9f3827d6e3e6d677b0e04e503d374e6fa (patch) | |
tree | 95520716a586c88baf6b58491f547dad64da7116 /t/lib | |
parent | 70df91df9052c5a7ec17f2851bfb85a77db45a94 (diff) | |
download | perl-1cf742e9f3827d6e3e6d677b0e04e503d374e6fa.tar.gz |
skip unreadable directory test when running as root
p4raw-id: //depot/perl@4414
Diffstat (limited to 't/lib')
-rwxr-xr-x | t/lib/glob-basic.t | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/t/lib/glob-basic.t b/t/lib/glob-basic.t index e3e53fe5e6..dde87730c0 100755 --- a/t/lib/glob-basic.t +++ b/t/lib/glob-basic.t @@ -68,16 +68,20 @@ print "ok 5\n"; # check bad protections # should return an empty list, and set ERROR -$dir = "PtEeRsLt.dir"; -mkdir $dir, 0; -@a = File::Glob::glob("$dir/*", GLOB_ERR); -#print "\@a = ", array(@a); -rmdir $dir; -if (scalar(@a) != 0 || (($^O ne 'MSWin32' and $^O ne 'os2') - && GLOB_ERROR == 0)) { - print "not "; +if ($^O eq 'MSWin32' or $^O eq 'os2' or not $>) { + print "ok 6 # skipped\n"; +} +else { + $dir = "PtEeRsLt.dir"; + mkdir $dir, 0; + @a = File::Glob::glob("$dir/*", GLOB_ERR); + #print "\@a = ", array(@a); + rmdir $dir; + if (scalar(@a) != 0 || GLOB_ERROR == 0) { + print "not "; + } + print "ok 6\n"; } -print "ok 6\n"; # check for csh style globbing @a = File::Glob::glob('{a,b}', GLOB_BRACE | GLOB_NOMAGIC); |