Brian,

First I appreciate you looking at my request.  I am happy to update,
rename, or rewrite as needed.  Any
suggestions or even redirects to another namespace are welcome.  I am more
than happy to acknowledge
a lack of creativity in my namespace choices.

The goal of this module is to capture output to STDERR and STDOUT into a
buffer while running other tests.
 This buffer is then be made accessible through functions for writing
tests.  Additionally turning the capture on and
off between test cases has been useful for me in a development sense.  For
example if I want to test a function that
returns a data set while sending a warning message I would like to test the
output data set while also testing the warning
message.  Another example is when the output of a function is the STDOUT
output but there may also be a warning message
that goes with it for malformed input.  Capturing the output from STDERR
and STDOUT in a buffer allows for testing of both
the results and auxiliary output of a test.  Finally, I tend to write my
code starting with the test and having the ability to turn on
and off the STDOUT capture at points in the test while the code and test is
being written has helped me while developing the code.

I have struggled with ways to do this and initially I was using the
excellent Test::Output that you wrote but I was unable to solve the
problem of testing functions and testing the STDERR output simultaneously.

Any directed pointers for solving this problem in other ways are welcome.

Best Regards,

Jed

On Mon, Apr 16, 2012 at 7:16 AM, brian d foy <brian.d....@gmail.com> wrote:

> [[ This message was both posted and mailed: see
>   the "To," "Cc," and "Newsgroups" headers for details. ]]
>
> In article <201204150624.q3f6o7qx029...@pause.fiz-chemie.de>, "Perl
> Authors Upload Server" <upl...@pause.perl.org> wrote:
>
> > The following module was proposed for inclusion in the Module List:
> >
> >   modid:       Test::And::Output
> >   DSLIP:       bdpOp
> >   description: Capture output during other tests
> >   userid:      JANDREW (Jed Lund)
>
>
> I read the description several times, but I think I'm still missing what
> you are trying to do. If you're trying to get the state of previous tests,
> a TAP consumer could probably do that with less fuss.
>
> I don't see how the name describes what you are trying to do, either.
>
> --
> brian d foy (one of many PAUSE admins), http://pause.perl.org
> PAUSE instructions:
> http://pause.perl.org/pause/query?ACTION=pause_04about
> Archives: http://www.xray.mpe.mpg.de/mailing-lists/modules
> Please send all messages back to modules@perl.org with no CC to me.
>

Reply via email to