3 # $Header: op.stat,v 1.0 87/12/18 13:14:27 root Exp $
7 open(foo, ">Op.stat.tmp");
9 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
10 $blksize,$blocks) = stat(foo);
11 if ($nlink == 1) {print "ok 1\n";} else {print "not ok 1\n";}
12 if ($mtime && $mtime == $ctime) {print "ok 2\n";} else {print "not ok 2\n";}
14 print foo "Now is the time for all good men to come to.\n";
18 while (time == $base) {}
20 `rm -f Op.stat.tmp2; ln Op.stat.tmp Op.stat.tmp2; chmod 644 Op.stat.tmp`;
22 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
23 $blksize,$blocks) = stat('Op.stat.tmp');
25 if ($nlink == 2) {print "ok 3\n";} else {print "not ok 3\n";}
26 if ($mtime && $mtime != $ctime) {print "ok 4\n";} else {print "not ok 4\n";}
27 print "#4 :$mtime: != :$ctime:\n";
29 `rm -f Op.stat.tmp Op.stat.tmp2`;