summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-22 10:53:06 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-22 10:53:06 +0000
commit2f3b6ae408a2d23f3c90b00b9fbaa2ad4c9a755a (patch)
treefcadde88e0cff324438491ab42fb917befd622c7 /t
parentf89480d452d435e4e828b4920af70120508474bb (diff)
downloadperl-2f3b6ae408a2d23f3c90b00b9fbaa2ad4c9a755a.tar.gz
truncate(FH) flushes FH before truncating it
p4raw-id: //depot/perl@4838
Diffstat (limited to 't')
-rwxr-xr-xt/io/fs.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/io/fs.t b/t/io/fs.t
index 72e9552037..0bcf579162 100755
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -152,11 +152,12 @@ else {
truncate "Iofs.tmp", 0;
if (-z "Iofs.tmp") {print "ok 24\n"} else {print "not ok 24\n"}
open(FH, ">Iofs.tmp") or die "Can't create Iofs.tmp";
+ binmode FH;
{ select FH; $| = 1; select STDOUT }
{
use strict;
- print FH "helloworld\n";
- truncate FH, 5;
+ print FH "x\n" x 200;
+ truncate(FH, 200) or die "Can't truncate FH: $!";
}
if ($^O eq 'dos'
# Not needed on HPFS, but needed on HPFS386 ?!
@@ -164,7 +165,7 @@ else {
{
close (FH); open (FH, ">>Iofs.tmp") or die "Can't reopen Iofs.tmp";
}
- if (-s "Iofs.tmp" == 5) {print "ok 25\n"} else {print "not ok 25\n"}
+ if (-s "Iofs.tmp" == 200) {print "ok 25\n"} else {print "not ok 25\n"}
truncate FH, 0;
if ($^O eq 'dos'
# Not needed on HPFS, but needed on HPFS386 ?!