summaryrefslogtreecommitdiff
path: root/t/test.pl
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-17 13:39:14 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-17 13:39:14 +0000
commit9b9ae264c15c6e735eff76081e59697eccac2e76 (patch)
tree7b786968d53a429b26bcaf2c98f3bf7c6abf0e21 /t/test.pl
parent909f2da27d169fb565d24bd492e53ab77a941091 (diff)
downloadperl-9b9ae264c15c6e735eff76081e59697eccac2e76.tar.gz
test.pl: ok mess to stdout not stderr on success
sub _ok() uses _diag() to print any additional messages passed as args. These go to stderr, and so mess up harness output. Make it instead use note() on success, which goes to stdout.
Diffstat (limited to 't/test.pl')
-rw-r--r--t/test.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/test.pl b/t/test.pl
index a66857699c..5c2ac08006 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -131,13 +131,14 @@ sub _ok {
_print "$out\n";
- unless ($pass) {
+ if ($pass) {
+ note @mess; # Ensure that the message is properly escaped.
+ }
+ else {
_diag "# Failed $where\n";
+ _diag @mess;
}
- # Ensure that the message is properly escaped.
- _diag @mess;
-
$test = $test + 1; # don't use ++
return $pass;