Adrian Howard wrote at Fri, 28 Feb 2003 11:40:52 +0000:

> I'd argue that Test::Warn isn't the right place :-) To me sending 
> output to STDERR and warnings are different things.

Absolutely.

> If added to Test::Warn I'd argue for separate functions. I've had 
> situations where warnings were logged, and STDERR was meant for user 
> readable output. Having them merged would break some tests of mine (not 
> many - I won't be *that* upset if everybody disagrees with me ;-).
> 
> I always meant to revisit the idea for Test::Output which was intended 
> to be a generic FILEHANDLE output testing module. Allows you to do 
> things like:
> 
> output_is     { hello() } "hello world\n", STDOUT, "hello world";
> output_isnt   { hello() } "goodbye",       STDOUT, "not goodbye";
> output_unlike { hello() } qr/bye/,         STDOUT, "didn't print bye";
> output_like   { hello() } qr/hello/,       STDOUT, "printed hello";
> like(Test::Output->last, qr/world/, "... and world");
> 
> Which (I think) would do all that you need.
> 
> (Draft implementation of above at <http://www.quietstars.com/perl/>)
> 
> However, I'm not really happy with the above API and haven't had the 
> time to think about it in any more detail. Suggestions welcome :-)

Sorry for my late anser,
but I also find the concept of a Test::Handle module for a great idea.
I'm looking forward to the CPAN release.

Greetings,
Janek

Reply via email to