From: Andreas König Date: Fri, 30 Mar 2001 10:11:43 +0000 (+0200) Subject: Better diagnostic in io/fs.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=62b869386d8173cdf50284b0022f92145e008643;p=p5sagit%2Fp5-mst-13.2.git Better diagnostic in io/fs.t Message-ID: p4raw-id: //depot/perl@9468 --- diff --git a/t/io/fs.t b/t/io/fs.t index 8170b33..ec14e62 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -155,14 +155,24 @@ else { unlink "Iofs.tmp"; `echo helloworld > Iofs.tmp`; eval { truncate "Iofs.tmp", 5; }; -if ($@ =~ /not implemented/) { - print "# truncate not implemented -- skipping tests 23 through 26\n"; - for (23 .. 26) { - print "ok $_\n"; +if ($@) { + if ($@ =~ /not implemented/) { + print "# truncate not implemented -- skipping tests 23 through 26\n"; + for (23 .. 26) { + print "ok $_ # Skip: no truncate\n"; + } + } else { + warn "io/fs before test 23: truncate dies with \$\@[$@]"; } } else { - if (-s "Iofs.tmp" == 5) {print "ok 23\n"} else {print "not ok 23\n"} + if (-s "Iofs.tmp" == 5) { + print "ok 23\n"; + } else { + my $s = -s "Iofs.tmp"; + printf "# -s Iofs.tmp: %s\n", defined($s) ? $s : "UNDEFINED"; + print "not ok 23\n"; + } 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";