in reply to Redirecting the output of Test::More

Could you use the return codes (true or false) of the Test::More methods to generate your own message for each test? I know that it is more cumbersome, but if there are no other alternatives...

For example:

ok($this eq $that, $test_name) || print "$this does not equal $that in + test: $test_name\n";

Replies are listed 'Best First'.
Re^2: Redirecting the output of Test::More
by chromatic (Archbishop) on Feb 18, 2005 at 19:21 UTC

    Test::Harness will try to interpret anything printed to STDOUT. diag() works better. (However, in this case, is() is the best option of all.)