From: Chip Salzenberg Date: Mon, 17 Feb 1997 22:29:53 +0000 (+1200) Subject: Tweak tests to notice $dont_use_nlink X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ea368a7c10bc6e18dd8f876577b54cc646eff77e;p=p5sagit%2Fp5-mst-13.2.git Tweak tests to notice $dont_use_nlink --- diff --git a/t/io/fs.t b/t/io/fs.t index dc29fda..ce4e56b 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -2,6 +2,13 @@ # $RCSfile: fs.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:28 $ +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +use Config; + print "1..26\n"; $wd = `pwd`; @@ -26,7 +33,9 @@ if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); -if ($nlink == 3) {print "ok 4\n";} else {print "not ok 4\n";} +if ($Config{dont_use_nlink} || $nlink == 3) + {print "ok 4\n";} else {print "not ok 4\n";} + if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";} if ((chmod 0777,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";} diff --git a/t/op/stat.t b/t/op/stat.t index b018b6c..0c9c025 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -3,6 +3,14 @@ # $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'; + @INC = '../lib'; +} + +use Config; + print "1..56\n"; chop($cwd = `pwd`); @@ -29,7 +37,9 @@ sleep 2; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('Op.stat.tmp'); -if ($nlink == 2) {print "ok 3\n";} else {print "not ok 3\n";} +if ($Config{dont_use_nlink} || $nlink == 2) + {print "ok 3\n";} else {print "not ok 3\n";} + if (($mtime && $mtime != $ctime) || $cwd =~ m#/afs/#) { print "ok 4\n"; }