From: Perl 5 Porters Date: Mon, 22 Jul 1996 18:11:25 +0000 (+0000) Subject: perl 5.003_01: t/lib/dirhand.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b4456a8892ee0830301c995e971fe019bf35ff0;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_01: t/lib/dirhand.t Check for readdir() directly, rather than more general POSIX test sort results of glob expansion for better alignment with readdir results --- diff --git a/t/lib/dirhand.t b/t/lib/dirhand.t index 8403609..aa7be35 100755 --- a/t/lib/dirhand.t +++ b/t/lib/dirhand.t @@ -4,7 +4,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; - if ($Config{'extensions'} !~ /\bPOSIX\b/) { + if (not $Config{'d_readdir'}) { print "1..0\n"; exit 0; } @@ -17,7 +17,7 @@ print "1..5\n"; $dot = new DirHandle "."; print defined($dot) ? "ok" : "not ok", " 1\n"; -@a = <*>; +@a = sort <*>; do { $first = $dot->read } while defined($first) && $first =~ /^\./; print +(grep { $_ eq $first } @a) ? "ok" : "not ok", " 2\n";