Recall that I'd discovered a problem with Test::Harness and the PIPE verb
on VMS, but there was not problem with TTY output or with file output. It
turns out that the problem existed with Perl 5.005_03 as well.
Craig Berry spotted a workaround that helps, but the fix needs to go into
Test.pm to workaround a record I/O flushing "bug" unique to VMS. (While
there may still be a problem with Test::Harness it is a completely
separate matter from bug ID 20010213.009).
This patch should be applicable to 5.6.1 trial2 and perl@8807 (a separate
patch for 5.005_03 will also be issued):
--- perl/lib/Test.pm.orig Wed Feb 14 15:33:06 2001
+++ perl/lib/Test.pm Wed Feb 14 15:37:23 2001
@@ -4,7 +4,7 @@
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 @@
$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,
End of Patch.
I'll also re-write the tests for Pod2VMSHlp to not C<use Test;> so as to
maintain reasonable compatability across a wide variety of installations.
Peter Prymmer