my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks);
-SKIP: {
+SKIP: {
skip("no link", 4) unless $has_link;
ok(link('a','b'), "link a b");
$newmode = 0666;
is(chmod($newmode,'c','x'), 2, "chmod two files");
-
+
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('c');
}
SKIP: {
- skip "filesystem atime/mtime granularity too low", 2
+ skip "filesystem atime/mtime granularity too low", 2
unless $accurate_timestamps;
print "# atime - $atime mtime - $mtime delta - $delta\n";
my ($new_atime, $new_mtime) = (stat('b'))[8,9];
print "# newatime - $new_atime nemtime - $new_mtime\n";
if ($new_atime == $atime && $new_mtime - $mtime == $delta) {
- pass("atime/mtime - accounted for possible NFS/glibc2.2 bug on linux");
- }
+ pass("atime - accounted for possible NFS/glibc2.2 bug on linux");
+ pass("mtime - accounted for possible NFS/glibc2.2 bug on linux");
+ }
else {
- fail("atime mtime - $atime/$new_atime $mtime/$new_mtime");
+ fail("atime - $atime/$new_atime $mtime/$new_mtime");
+ fail("mtime - $atime/$new_atime $mtime/$new_mtime");
}
- }
+ }
elsif ($^O eq 'VMS') {
# why is this 1 second off?
is( $atime, 500000001, 'atime' );
is( $mtime, 500000000 + $delta, 'mtime' );
- }
+ }
elsif ($^O eq 'beos') {
SKIP: { skip "atime not updated", 1; }
is($mtime, 500000001, 'mtime');
- }
+ }
else {
fail("atime");
fail("mtime");
SKIP: {
skip "Win32/Netware specific test", 2
unless ($^O eq 'MSWin32') || ($^O eq 'NetWare');
- skip "No symbolic links found to test with", 2
+ skip "No symbolic links found to test with", 2
unless `ls -l perl 2>nul` =~ /^l.*->/;
system("cp TEST TEST$$");
open(fh,'>x') || die "Can't create x";
close(fh);
rename('x', 'X');
-
+
# this works on win32 only, because fs isn't casesensitive
ok(-e 'X', "rename working");