summaryrefslogtreecommitdiff
path: root/lib/Test.pm
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2001-02-14 08:28:16 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-20 19:53:44 +0000
commit2a88172dfacd85c59631dbbc024c8f5d73ec8a9f (patch)
tree3e5ee321605c253a7078af2eccdaa2474b61d02b /lib/Test.pm
parente9c56f9ba521e0a84f6515d616ba85a283fa36a6 (diff)
downloadperl-2a88172dfacd85c59631dbbc024c8f5d73ec8a9f.tar.gz
workaround VMS I/O problem in Test.pm for bug ID 20010213.009
Message-ID: <Pine.OSF.4.10.10102141617350.197219-100000@aspara.forte.com> p4raw-id: //depot/perl@8861
Diffstat (limited to 'lib/Test.pm')
-rw-r--r--lib/Test.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Test.pm b/lib/Test.pm
index 60e9f7eee1..4a38d54668 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,