From: Andreas König Date: Thu, 27 Dec 2001 09:21:16 +0000 (+0100) Subject: better error diagnosis from t/op/sysio.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=502257bbd84303d76b53d1bb0970d257fb57e87e;p=p5sagit%2Fp5-mst-13.2.git better error diagnosis from t/op/sysio.t Message-ID: p4raw-id: //depot/perl@13902 --- diff --git a/t/op/sysio.t b/t/op/sysio.t index 251c7f8..473a3f0 100755 --- a/t/op/sysio.t +++ b/t/op/sysio.t @@ -6,7 +6,11 @@ chdir('op') || chdir('t/op') || die "sysio.t: cannot look for myself: $!"; open(I, 'sysio.t') || die "sysio.t: cannot find myself: $!"; -$reopen = ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'dos' || +$reopen = ($^O eq 'VMS' || + $^O eq 'os2' || + $^O eq 'MSWin32' || + $^O eq 'NetWare' || + $^O eq 'dos' || $^O eq 'mpeix'); $x = 'abc'; @@ -108,8 +112,14 @@ print 'not ' if (-s $outfile); print "ok 19\n"; # default offset 0 -print 'not ' unless (syswrite(O, $a, 2) == 2); -print "ok 20\n"; +if (syswrite(O, $a, 2) == 2){ + print "ok 20\n"; +} else { + print "# $!\nnot ok 20\n"; + # most other tests make no sense after e.g. "No space left on device" + die $!; +} + # $a still intact print 'not ' unless ($a eq "#!.\0\0erl"); @@ -203,7 +213,7 @@ close(I); unlink $outfile; -chdir('..'); +chdir('..'); 1;