[[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <CAM4-=+m3shf-sqdcazzkuqbnasvmkevmqt-naztk1vnxhuv...@mail.gmail.com>, Jed Lund <jandrewl...@gmail.com> wrote: > 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. This still sounds to me like there's something fundamental that might be able to do this more easily. Maybe we can move this to the q...@perl.org list and let the testing people have a crack at it. I'm still having a tough time seeing what the problem is and an even tougher time understanding the solution. > 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. I didn't write it. I just patched it. :) -- 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.