Re: Testing What Was Printed

2005-02-11 Thread James E Keenan
David Cantrell wrote: Jim Keenan wrote: Using the standard Test::More framework, is it possible to test whether what was printed to a filehandle matches a predetermined string or list of strings? Would IO::Capture be of help here? And here are the fruits of my application of IO::Capture: a module

Re: Testing What Was Printed

2005-02-11 Thread David Golden
My $0.02: Very nice integration of IO::Capture. I think this is very promising, but all the start(), stop() calls seem overly repetitive to me. What about refactoring it into a set of test functions that handle it for the user automatically? Just quickly off the cuff, what about a test module

Re: Testing What Was Printed

2005-02-11 Thread James E Keenan
David Golden wrote: My $0.02: Very nice integration of IO::Capture. I think this is very promising, but all the start(), stop() calls seem overly repetitive to me. Agreed. What about refactoring it into a set of test functions that handle it for the user automatically? Just quickly off the cu

Re: Testing What Was Printed

2005-02-11 Thread Michael G Schwern
On Fri, Feb 11, 2005 at 07:30:24AM -0500, David Golden wrote: > Very nice integration of IO::Capture. > > I think this is very promising, but all the start(), stop() calls seem > overly repetitive to me. What about refactoring it into a set of test > functions that handle it for the user automa

Re: Testing What Was Printed

2005-02-11 Thread Shawn Sorichetti
On Feb 11, 2005, at 2:44 PM, Michael G Schwern wrote: On Fri, Feb 11, 2005 at 07:30:24AM -0500, David Golden wrote: Very nice integration of IO::Capture. I think this is very promising, but all the start(), stop() calls seem overly repetitive to me. What about refactoring it into a set of test fun

Re: Testing What Was Printed

2005-02-11 Thread David H. Adler
On Thu, Feb 10, 2005 at 09:28:30PM -0500, James E Keenan wrote: > And here are the fruits of my application of IO::Capture: a module with > three subroutines which have proven useful in the project I'm working on > for my day job. > > The full module is here: > http://mysite.verizon.net/jkeen

Re: Testing What Was Printed

2005-02-11 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Friday 11 February 2005 21:08, David H. Adler wrote: > On Thu, Feb 10, 2005 at 09:28:30PM -0500, James E Keenan wrote: > > And here are the fruits of my application of IO::Capture: a module > > with three subroutines which have proven useful in the pro

Test::Builder Cookbook

2005-02-11 Thread Joe McMahon
Started on the qa-wiki. First entry: how to return an internal failure as a proper test failure so that Test::Builder::Tester and Test::Tester will like it. --- Joe M.

Re: Testing What Was Printed

2005-02-11 Thread James E Keenan
Shawn Sorichetti wrote: I've started working on Test::Output that is based on Schwern's TieOut module that comes with Test::More. I'm hoping to have it released on CPAN later tonight. Test::Output is a self contained so that it can be included with other modules, and no prereqs. Right now it

Re: Testing What Was Printed

2005-02-11 Thread James E Keenan
Tels wrote: On Friday 11 February 2005 21:08, David H. Adler wrote: Just askin'. :-) In similiar line of thought: Why "verify_number_lines" instead of the (much shorter :) "lines"? "Speaking source code" is something I like, but it shouldn't gabble on :) Oh, and why "TestAuxiliary" and not "Test::

Re: Testing What Was Printed

2005-02-11 Thread James E Keenan
David H. Adler wrote: A question: is there any reason that you made this an OO module but still show calls to the methods as functions rather than methods on the object? An answer: It was a quick hack based on my first day's experience with IO::Capture::Stdout. Its original rationale was simpl