From: Peter Prymmer Date: Wed, 14 Feb 2001 16:28:16 +0000 (-0800) Subject: workaround VMS I/O problem in Test.pm for bug ID 20010213.009 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a88172dfacd85c59631dbbc024c8f5d73ec8a9f;p=p5sagit%2Fp5-mst-13.2.git workaround VMS I/O problem in Test.pm for bug ID 20010213.009 Message-ID: p4raw-id: //depot/perl@8861 --- diff --git a/lib/Test.pm b/lib/Test.pm index 60e9f7e..4a38d54 100644 --- a/lib/Test.pm +++ b/lib/Test.pm @@ -4,7 +4,7 @@ use Test::Harness 1.1601 (); use Carp; our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $ntest, $TestLevel); #public-ish our($TESTOUT, $ONFAIL, %todo, %history, $planned, @FAILDETAIL); #private-ish -$VERSION = '1.14'; +$VERSION = '1.15'; require Exporter; @ISA=('Exporter'); @EXPORT=qw(&plan &ok &skip); @@ -81,8 +81,16 @@ sub ok ($;$$) { $context .= ' TODO?!' if $todo; print $TESTOUT "ok $ntest # ($context)\n"; } else { - print $TESTOUT "not " if !$ok; - print $TESTOUT "ok $ntest\n"; + # Issuing two separate print()s causes severe trouble with + # Test::Harness on VMS. The "not "'s for failed tests occur + # on a separate line and would not get counted as failures. + #print $TESTOUT "not " if !$ok; + #print $TESTOUT "ok $ntest\n"; + # Replace with a single print() as a workaround: + my $okline = ''; + $okline = "not " if !$ok; + $okline .= "ok $ntest\n"; + print $TESTOUT $okline; if (!$ok) { my $detail = { 'repetition' => $repetition, 'package' => $pkg,