diff options
author | Craig A. Berry <craigberry@mac.com> | 2018-08-02 17:30:21 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2018-08-02 17:50:38 -0500 |
commit | 7364bfc65738891785cf45df5010cd2c4c88768b (patch) | |
tree | 4c044a1b1ecade30ffcea99f125221baed7f526b /t/opbasic | |
parent | 2fc0bbfaf20433c2663d94acdd4415e76007ac77 (diff) | |
download | perl-7364bfc65738891785cf45df5010cd2c4c88768b.tar.gz |
Avoid extra newlines on VMS in t/opbasic/arith.t
Separate print statements through a pipe with autoflush on cause
extra newlines due a bug in the VMS pipe implementation, and were
causing this test to fail with an "unexpected output" message. So
consolidate into a single print statement.
Diffstat (limited to 't/opbasic')
-rw-r--r-- | t/opbasic/arith.t | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/t/opbasic/arith.t b/t/opbasic/arith.t index 625f4c0e16..96b243b2c5 100644 --- a/t/opbasic/arith.t +++ b/t/opbasic/arith.t @@ -13,28 +13,30 @@ BEGIN { print "1..186\n"; sub try ($$$) { - print +($_[1] ? "ok" : "not ok"), " $_[0] - $_[2]\n"; + print +($_[1] ? "ok" : "not ok") . " $_[0] - $_[2]\n"; } sub tryeq ($$$$) { + my $status; if ($_[1] == $_[2]) { - print "ok $_[0]"; + $status = "ok $_[0]"; } else { - print "not ok $_[0] # $_[1] != $_[2]"; + $status = "not ok $_[0] # $_[1] != $_[2]"; } - print " - $_[3]\n"; + print "$status - $_[3]\n"; } sub tryeq_sloppy ($$$$) { + my $status; if ($_[1] == $_[2]) { - print "ok $_[0]"; + $status = "ok $_[0]"; } else { my $error = abs (($_[1] - $_[2]) / $_[1]); if ($error < 1e-9) { - print "ok $_[0] # $_[1] is close to $_[2], \$^O eq $^O"; + $status = "ok $_[0] # $_[1] is close to $_[2], \$^O eq $^O"; } else { - print "not ok $_[0] # $_[1] != $_[2]"; + $status = "not ok $_[0] # $_[1] != $_[2]"; } } - print " - $_[3]\n"; + print "$status - $_[3]\n"; } my $T = 1; |