Change 33274 by [EMAIL PROTECTED] on 2008/02/11 00:05:14
Make fs.t compare the permissions of a link with those
of the linked file rather than guessing at system defaults.
Affected files ...
... //depot/perl/t/io/fs.t#62 edit
Differences ...
==== //depot/perl/t/io/fs.t#62 (xtext) ====
Index: perl/t/io/fs.t
--- perl/t/io/fs.t#61~31980~ 2007-09-26 07:55:15.000000000 -0700
+++ perl/t/io/fs.t 2008-02-10 16:05:14.000000000 -0800
@@ -87,7 +87,7 @@
close(FH);
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks);
+ $blksize,$blocks,$a_mode);
SKIP: {
skip("no link", 4) unless $has_link;
@@ -95,6 +95,8 @@
ok(link('a','b'), "link a b");
ok(link('b','c'), "link b c");
+ $a_mode = (stat('a'))[2];
+
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('c');
@@ -111,7 +113,9 @@
# if ($^O eq 'cygwin') { # new files on cygwin get rwx instead of rw-
# is($mode & 0777, 0777, "mode of triply-linked file");
# } else {
- is($mode & 0777, 0666, "mode of triply-linked file");
+ is(sprintf("0%o", $mode & 0777),
+ sprintf("0%o", $a_mode & 0777),
+ "mode of triply-linked file");
# }
}
}
End of Patch.