I am attempting to write tests (using whichever Tests::...) for a module that will use Test::Harness. The module outputs to STDOUT (it just does).

Now, in theory, Test::Harness currently ignores anything that doesn't start with "ok" or "not ok", but for whatever reason, when I have "no_plan", it can't handle it. Ok, I can deal with that - I can make a plan.

HOWEVER, from the POD for Test::Harness:

> Any other output Test::Harness sees it will silently ignore BUT WE
> PLAN TO CHANGE THIS! If you wish to place additional output in your
> test script, please use a comment.

Ok, what's the elegent way to ignore/dispose of the output the tested module produces?

So far, I've come up with 2 ideas:
1. Hack something up to snatch away STDOUT and hope Test::More handles it correctly.


2. Use Test::Builder and direct the tests output to some file... But there has to be some better way, right?

Thanks!

--Peter

Reply via email to