if (-s "Iofs.tmp" == 5) {print "ok 23\n"} else {print "not ok 23\n"}
truncate "Iofs.tmp", 0;
if (-z "Iofs.tmp") {print "ok 24\n"} else {print "not ok 24\n"}
- `echo helloworld > Iofs.tmp`;
open(FH, ">Iofs.tmp") or die "Can't create Iofs.tmp";
+ { select FH; $| = 1; select STDOUT }
+ print FH "helloworld\n";
truncate FH, 5;
if (-s "Iofs.tmp" == 5) {print "ok 25\n"} else {print "not ok 25\n"}
truncate FH, 0;
#!./perl
# $RCSfile: stat.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:28 $
-# 950521 DFD This version hacked to make test 39 succeed on MachTen
-# though the O.S. wrongly thinks /dev/null is a terminal
BEGIN {
chdir 't' if -d 't';
$cnt = $uid = 0;
die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
-($bin) = grep {-d} qw(/bin /usr/bin)
+($bin) = grep {-d} ($^O eq 'machten' ? qw(/usr/bin /bin) : qw(/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)) {
}
if (! -t tty) {print "ok 38\n";} else {print "not ok 38\n";}
open(null,"/dev/null");
-if (! -t null || -e '/xenix' || -e '/MachTen' || $Is_MSWin32)
+if (! -t null || -e '/xenix' || $^O eq 'machten' || $Is_MSWin32)
{print "ok 39\n";} else {print "not ok 39\n";}
close(null);
if (-t) {print "ok 40\n";} else {print "not ok 40\n";}