summaryrefslogtreecommitdiff
path: root/lib/Test.pm
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2001-02-23 02:51:37 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-26 14:37:07 +0000
commite542038281114e9ad7ceaa6c95bec02e681da55a (patch)
treeae4c92a868d4c8291bc7d40ca911f464d8f69c78 /lib/Test.pm
parent17b829faa49fc1af815121853b94d0a80a9ad31f (diff)
downloadperl-e542038281114e9ad7ceaa6c95bec02e681da55a.tar.gz
Re: [PATCH: perl 5.005_03] Record I/O fix for Test.pm in older perl
Message-ID: <Pine.OSF.4.10.10102231042010.79050-100000@aspara.forte.com> p4raw-id: //depot/perl@8949
Diffstat (limited to 'lib/Test.pm')
-rw-r--r--lib/Test.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Test.pm b/lib/Test.pm
index 4a38d54668..89b9cec43f 100644
--- a/lib/Test.pm
+++ b/lib/Test.pm
@@ -86,11 +86,13 @@ sub ok ($;$$) {
# 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;
+ # Replace with one of a pair of single print()'s as a workaround:
+ if (!$ok) {
+ print $TESTOUT "not ok $ntest\n";
+ }
+ else {
+ print $TESTOUT "ok $ntest\n";
+ }
if (!$ok) {
my $detail = { 'repetition' => $repetition, 'package' => $pkg,