Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Redirecting the output of Test::More

by mlh2003 (Scribe)
on Feb 18, 2005 at 13:19 UTC ( #432314=note: print w/replies, xml ) Need Help??

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.)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://432314]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-10-26 22:31 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (91 votes). Check out past polls.