diff options
author | David Mitchell <davem@iabyn.com> | 2011-02-17 13:39:14 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-02-17 13:39:14 +0000 |
commit | 9b9ae264c15c6e735eff76081e59697eccac2e76 (patch) | |
tree | 7b786968d53a429b26bcaf2c98f3bf7c6abf0e21 /t/test.pl | |
parent | 909f2da27d169fb565d24bd492e53ab77a941091 (diff) | |
download | perl-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.pl | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; |