summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/lib/Test.pm
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2001-05-24 18:21:31 +0000
committermillert <millert@openbsd.org>2001-05-24 18:21:31 +0000
commitc48bdce47de487644c5bf49fc71f7db60e4f07d6 (patch)
tree1044cea90429d4b1485356ed038fb38b7dba2eb2 /gnu/usr.bin/perl/lib/Test.pm
parentAdd isakmpd.pid to the FILES section. (diff)
downloadwireguard-openbsd-c48bdce47de487644c5bf49fc71f7db60e4f07d6.tar.xz
wireguard-openbsd-c48bdce47de487644c5bf49fc71f7db60e4f07d6.zip
stock perl 5.6.1
Diffstat (limited to 'gnu/usr.bin/perl/lib/Test.pm')
-rw-r--r--gnu/usr.bin/perl/lib/Test.pm21
1 files changed, 14 insertions, 7 deletions
diff --git a/gnu/usr.bin/perl/lib/Test.pm b/gnu/usr.bin/perl/lib/Test.pm
index c708f57a050..4a38d546689 100644
--- a/gnu/usr.bin/perl/lib/Test.pm
+++ b/gnu/usr.bin/perl/lib/Test.pm
@@ -1,11 +1,10 @@
use strict;
package Test;
-use 5.005_64;
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.13';
+$VERSION = '1.15';
require Exporter;
@ISA=('Exporter');
@EXPORT=qw(&plan &ok &skip);
@@ -82,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,
@@ -178,9 +185,9 @@ __END__
=head1 DESCRIPTION
-L<Test::Harness> expects to see particular output when it executes
-tests. This module aims to make writing proper test scripts just a
-little bit easier (and less error prone :-).
+L<Test::Harness|Test::Harness> expects to see particular output when it
+executes tests. This module aims to make writing proper test scripts just
+a little bit easier (and less error prone :-).
=head1 TEST TYPES