summaryrefslogtreecommitdiff
path: root/t/op/stat.t
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-02-22 02:41:53 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-22 02:41:53 +1200
commitb971f6e4f6780f32fa16abecd87989a37436a193 (patch)
tree994f413811bce803c47f599cc156e4beb08184e4 /t/op/stat.t
parent1defb83ec18f7f520caf4152c2f5c63dbf3cc155 (diff)
downloadperl-b971f6e4f6780f32fa16abecd87989a37436a193.tar.gz
[inseparable changes from match from perl5.003_28 to perl-5.003_90]
BUILD PROCESS Subject: Re: ccdlflags don't quite work Date: Mon, 24 Feb 1997 16:07:07 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: Configure Msg-ID: <Pine.SOL.3.95q.970224160630.5700E-100000@fractal.lafayette.e (applied based on p5p patch as commit bc75e68b7b49a5ac07dc839aec7ca05eba51175f) Subject: Use $ccflags, $ldflags, $libs when determining $randbits From: Chip Salzenberg <chip@perl.com> Files: Configure Subject: 'installperl -v' doesn't do enough Date: Mon, 24 Feb 1997 08:42:59 -0500 From: Spider Boardman <spider@Orb.Nashua.NH.US> Files: installperl Msg-ID: <199702241342.IAA25945@Orb.Nashua.NH.US> (applied based on p5p patch as commit 7287d43f85a3731984c0e0ef1f20e1515b4140f2) Subject: installperl breaks running system (for a while) Date: Mon, 24 Feb 1997 09:12:11 -0500 From: Spider Boardman <spider@Orb.Nashua.NH.US> Files: installperl Msg-ID: <199702241412.JAA11829@Orb.Nashua.NH.US> (applied based on p5p patch as commit ec2a3d87ba26a9586ad981051a949403027c147a) CORE PORTABILITY Subject: Digital UNIX and 3_28 Date: Sun, 23 Feb 1997 16:27:19 +0200 (EET) From: Jarkko Hietaniemi <jhi@iki.fi> Files: Configure MANIFEST ext/NDBM_File/hints/dec_osf.pl ext/ODBM_File/hints/dec_osf.pl hints/dec_osf.sh Msg-ID: <199702231427.QAA13807@alpha.hut.fi> (applied based on p5p patch as commit 58c0852f6968d0b4520a03e22a56226185ab78c6) Subject: AmigaOS patches to 5.003_28 Date: Sat, 22 Feb 1997 18:08:02 +0100 From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de> Files: README.amiga hints/amigaos.sh t/io/fs.t t/lib/anydbm.t t/lib/db-btree.t t/lib/db-hash.t t/lib/db-recno.t t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t t/op/magic.t t/op/stat.t Msg-ID: <77724759@Armageddon.meb.uni-bonn.de> (applied based on p5p patch as commit b8e6d11c134e93a7795379ceb62b7f950607c667) TESTS Subject: Don't use <*> where readdir() will do From: Chip Salzenberg <chip@perl.com> Files: t/op/stat.t Subject: Allow for $^X to be 'miniperl' Date: Sun, 23 Feb 1997 16:22:45 +0100 From: Dominic Dunlop <domo@slipper.ip.lu> Files: t/op/magic.t private-msgid: <v03020903af360f31aced@[194.51.248.65]>
Diffstat (limited to 't/op/stat.t')
-rwxr-xr-xt/op/stat.t11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/op/stat.t b/t/op/stat.t
index 0c9c025bf3..f0fd9a00b1 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -40,7 +40,7 @@ sleep 2;
if ($Config{dont_use_nlink} || $nlink == 2)
{print "ok 3\n";} else {print "not ok 3\n";}
-if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/#) {
+if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/# || $^O eq 'amigaos') {
print "ok 4\n";
}
else {
@@ -123,18 +123,21 @@ else
{print "not ok 33\n";}
if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";}
+if ($^O eq 'amigaos') {print "ok 35\n"; goto tty_test;}
+
$cnt = $uid = 0;
die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
($bin) = grep {-d} qw(/bin /usr/bin)
or print ("not ok 35\n"), goto tty_test;
-chdir $bin || die "Can't cd to $bin: $!";
-while (defined($_ = <*>)) {
+opendir BIN, $bin or die "Can't opendir $bin: $!";
+while (defined($_ = readdir BIN)) {
+ $_ = "$bin/$_";
$cnt++;
$uid++ if -u;
last if $uid && $uid < $cnt;
}
-chdir $cwd || die "Can't cd back to $cwd";
+closedir BIN;
# I suppose this is going to fail somewhere...
if ($uid > 0 && $uid < $cnt)