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?
I.e. why Cverify_number_lines($capture) rather than
C$capture-verify_number_lines ? This would also remove the need to
On Sat, Feb 12, 2005 at 11:30:56PM -0500, David A. Golden wrote:
stdout_is {
print scalar caller;
} scalar caller;
That's a good warning on code blocks, and worth documenting for a module
like this, but I'm not sure it's going to be a big issue in writing test
On 11 Feb 2005, at 19:52, Shawn Sorichetti wrote:
[snip]
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
Michael G Schwern wrote:
On Fri, Feb 11, 2005 at 07:30:24AM -0500, David Golden wrote:
stdout_is { fcn() } $string, comment; # exact
stdout_like{ fcn() } qr/regex/, comment; # regex match
stdout_count { fcn() } qr/regex/, $count, comment; # number of matches
stdout_found { fcn() }
On Sat, Feb 12, 2005 at 12:47:56PM -0500, David A. Golden wrote:
The trouble with this interface is sometimes you want to collect a bunch
of output from a bunch of different functions together.
That's why I suggested that it be prototyped to take a code block:
stdout_is {
fcn1();
Michael G Schwern wrote:
On Sat, Feb 12, 2005 at 12:47:56PM -0500, David A. Golden wrote:
The trouble with this interface is sometimes you want to collect a bunch
of output from a bunch of different functions together.
That's why I suggested that it be prototyped to take a code block:
stdout_is {
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
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
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
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
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
-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 project
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
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
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
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?
Consider the following:
use Test::More tests = 1;
is(get_data_count([1..39]), 39,
should be 39 items);
sub
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?
--
David Cantrell
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?
Looks promising. Hope to find time today to try it out and report
On Mon, Feb 07, 2005 at 12:46:51PM -0800, 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?
Any number of existing modules can be used which capture the output of
a
19 matches
Mail list logo