From: Gurusamy Sarathy Date: Wed, 20 Oct 1999 00:37:46 +0000 (+0000) Subject: skip unreadable directory test when running as root X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1cf742e9f3827d6e3e6d677b0e04e503d374e6fa;p=p5sagit%2Fp5-mst-13.2.git skip unreadable directory test when running as root p4raw-id: //depot/perl@4414 --- diff --git a/t/lib/glob-basic.t b/t/lib/glob-basic.t index e3e53fe..dde8773 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);