Re: [perl #36622] y/// at end of file
[p5sagit/p5-mst-13.2.git] / t / op / stat.t
index c553a16..924c5f4 100755 (executable)
@@ -9,7 +9,7 @@ BEGIN {
 use Config;
 use File::Spec;
 
-plan tests => 80;
+plan tests => 82;
 
 my $Perl = which_perl();
 
@@ -168,11 +168,6 @@ SKIP: {
 
 
 
-
-# in ms windows, $tmpfile inherits owner uid from directory
-# not sure about os/2, but chown is harmless anyway
-eval { chown $>,$tmpfile; 1 } or print "# $@" ;
-
 ok(chmod(0700,$tmpfile),    'chmod 0700');
 ok(-r $tmpfile,     '   -r');
 ok(-w $tmpfile,     '   -w');
@@ -453,6 +448,18 @@ ok( (-A _) < 0, 'negative -A works');
 ok( (-C _) < 0, 'negative -C works');
 ok(unlink($f), 'unlink tmp file');
 
+{
+    ok(open(F, ">", $tmpfile), 'can create temp file');
+    close F;
+    chmod 0077, $tmpfile;
+    my @a = stat($tmpfile);
+    my $s1 = -s _;
+    -T _;
+    my $s2 = -s _;
+    is($s1, $s2, q(-T _ doesn't break the statbuffer));
+    unlink $tmpfile;
+}
+
 END {
     1 while unlink $tmpfile;
 }