X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fstat.t;h=f7a2a4ec8d96f00c8ece83bad2d81423ca45ba7e;hb=95e8664e86da93255f26600f44bbbd70bf5b5b0e;hp=6c508ebdddbd5cbf5252b3c06d7b086b01a799bf;hpb=ad52c9ebd1217cdd30d8a5568b46bfab6236a484;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/stat.t b/t/op/stat.t index 6c508eb..f7a2a4e 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -69,7 +69,7 @@ else {print "# \$nlink is |$nlink|\nnot ok 3\n";} if ( $Is_Dosish # Solaris tmpfs bug || ($cwd =~ m#^/tmp# and $mtime && $mtime==$ctime && $^O eq 'solaris') - || $cwd =~ m#/afs/# + || $cwd =~ m#$Config{'afsroot'}/# || $^O eq 'amigaos') { print "ok 4 # skipped: different semantic of mtime/ctime\n"; } @@ -178,15 +178,18 @@ if ($^O eq 'mpeix' or $^O eq 'amigaos' or $Is_Dosish or $Is_Cygwin) { $cnt = $uid = 0; die "Can't run op/stat.t test 35 without pwd working" unless $cwd; -($bin) = grep {-d} ($^O eq 'machten' ? qw(/usr/bin /bin) : - qw(/sbin /usr/sbin /bin /usr/bin)) - or print ("not ok 35\n"), goto tty_test; -opendir BIN, $bin or die "Can't opendir $bin: $!"; -while (defined($_ = readdir BIN)) { - $_ = "$bin/$_"; - $cnt++; - $uid++ if -u; - last if $uid && $uid < $cnt; +my @bin = grep {-d} ($^O eq 'machten' ? + qw(/usr/bin /bin) : + qw(/sbin /usr/sbin /bin /usr/bin)); +unless (@bin) { print ("not ok 35\n"), goto tty_test; } +for my $bin (@bin) { + opendir BIN, $bin or die "Can't opendir $bin: $!"; + while (defined($_ = readdir BIN)) { + $_ = "$bin/$_"; + $cnt++; + $uid++ if -u; + last if $uid && $uid < $cnt; + } } closedir BIN;