use Config;
use File::Spec;
-plan tests => 80;
+plan tests => 82;
my $Perl = which_perl();
-
-# 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');
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;
}