Upgrade to PathTools 3.10
[p5sagit/p5-mst-13.2.git] / lib / File / stat.t
index 0c2f22d..2359453 100644 (file)
@@ -58,7 +58,7 @@ is( $stat->blocks, $stat[12], "number of blocks in position 12" );
 
 SKIP: {
        local *STAT;
-       skip(2, "Could not open file: $!") unless open(STAT, 'TEST');
+       skip("Could not open file: $!", 2) unless open(STAT, 'TEST');
        ok( File::stat::stat('STAT'), '... should be able to find filehandle' );
 
        package foo;
@@ -67,7 +67,18 @@ SKIP: {
                '... and filehandle in another package' );
        close STAT;
 
-       main::is( "@$stat", "@$stat2", '... and must match normal stat' );
+#      VOS open() updates atime; ignore this error (posix-975).
+       my $stat3 = $stat2;
+       if ($^O eq 'vos') {
+               $$stat3[8] = $$stat[8];
+       }
+
+       main::skip("Win32: different stat-info on filehandle", 1) if $^O eq 'MSWin32';
+       main::skip("dos: inode number is fake on dos", 1) if $^O eq 'dos';
+
+       main::skip("OS/2: inode number is not constant on os/2", 1) if $^O eq 'os2';
+
+       main::is( "@$stat", "@$stat3", '... and must match normal stat' );
 }
 
 local $!;