fs.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl
# $RCSfile: fs.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:28 $
BEGIN {
chdir 't' if -d 't';
}
use Config;
}
print "1..29\n";
chdir './tmp';
umask(022);
elsif ((umask(0)&0777) == 022) {print "ok 1\n";} else {print "not ok 1\n";}
if ($Is_Dosish) {print "ok 2 # skipped: no link\n";}
else {print "not ok 2\n";}
if ($Is_Dosish) {print "ok 3 # skipped: no link\n";}
else {print "not ok 3\n";}
if ($Config{dont_use_nlink} || $Is_Dosish)
{print "ok 4 # skipped: no link\n";}
elsif ($nlink == 3)
{print "ok 4\n";}
else {print "not ok 4\n";}
{print "ok 5 # skipped: no link\n";}
{print "ok 5\n";}
else {print "not ok 5\n";}
if ($Is_Dosish) {print "ok 7 # skipped: no link\n";}
else {print "not ok 7\n";}
$newmode = 0700;
$newmode = 0666;
}
if ($Is_Dosish) {print "ok 8 # skipped: no link\n";}
else {print "not ok 8\n";}
if ($Is_Dosish) {print "ok 9 # skipped: no link\n";}
else {print "not ok 9\n";}
if ($Is_Dosish) {print "ok 10 # skipped: no link\n";}
else {print "not ok 10\n";}
else {print "not ok 11\n";}
if ($wd =~ m#/afs/# || $^O eq 'amigaos' || $^O eq 'dos' || $^O eq 'MSWin32')
{print "ok 18 # skipped: granularity of the filetime\n";}
{print "ok 18\n";}
# Maybe stat() cannot get the correct atime, as happens via NFS on linux?
if ($new_atime == $atime && $new_mtime - $mtime == $delta)
else
} else
# we have symbolic links
# we have to copy because e.g. GNU grep gets huffy if we have
# a symlink forest to another disk (it complains about too many
# levels of symbolic links, even if we have only two)
}
else {
print "ok 21\nok 22\n";
}
# truncate (may not be implemented everywhere)
`echo helloworld > Iofs.tmp`;
print "# truncate not implemented -- skipping tests 23 through 26\n";
for (23 .. 26) {
print "ok $_\n";
}
}
else {
{
use strict;
}
# Not needed on HPFS, but needed on HPFS386 ?!
{
}
# Not needed on HPFS, but needed on HPFS386 ?!
{
}
}
# check if rename() can be used to just change case of filename
chdir './tmp';
print "ok 27\n";
# check if rename() works on directories
print "ok 28\n";
print "ok 29\n";