Message-Id: <
200501291652.53841.eipel@web.de>
(-T and -B invalidate _ filehandle when no read permission on file)
plus a regression test
p4raw-id: //depot/perl@23986
sv = POPs;
really_filename:
PL_statgv = Nullgv;
- PL_laststatval = -1;
PL_laststype = OP_STAT;
sv_setpv(PL_statname, SvPV(sv, n_a));
if (!(fp = PerlIO_open(SvPVX(PL_statname), "r"))) {
use Config;
use File::Spec;
-plan tests => 80;
+plan tests => 82;
my $Perl = which_perl();
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 $file;
+}
+
END {
1 while unlink $tmpfile;
}