The thing I want to test is the output of my piece of code to STDOUT and STDERR. The kind of code I am writing is just like the output of a compiler which outputs to STDOUT and sends warnings to STDERR. Of course, there won't be warnings when the input is correct. In the tests for this code, I would like not only to test the successful cases but also the bad cases. So I found this need to watch STDOUT and STDERR.

One of the things I am not confident at is the interplay with
modules like Test::More. Where they send their output: STDERR?

Adriano.


On Sun, 8 Feb 2004 19:00:02 -0600, Andy Lester <[EMAIL PROTECTED]> wrote:


While writing tests for some of my code, I was faced with the issue
of capturing what the code sends to STDOUT and STDERR. As I have not
found a module to make it easy, I wrote a trivial code to do it. It
is used like this:

I'm not sure what you're actually trying to test. If you're testing test modules, look at Test::Builder::Tester.

xoa


-- Oasis Comunicacao e Tecnologia Ltda.

Reply via email to