Re: Testing output to STDOUT and STDERR

2004-02-10 Thread Andy Lester
> Hi, I also have a lot of stuff to bundle! I can even arrange to produce > unbundled code so you can practice your bundling skills. You can make a > reputation as "Lester the Bundler". It's not like I need practice in make a distro. I just wanna help along the stuff that I think sounds useful...

Re: Testing output to STDOUT and STDERR

2004-02-10 Thread khemir nadim
"Andy Lester" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Because: > > a) I wasn't happy with the API > > b) I'm a lazy SOB and couldn't find the time to sort it out > > I'll be glad to help with the second part. Mail me the parts and I'll > bundle it up all nice for ya. Hi,

Re: Testing output to STDOUT and STDERR

2004-02-10 Thread A. Pagaltzis
* Adriano R. Ferreira <[EMAIL PROTECTED]> [2004-02-09 01:56]: > While writing tests for some of my code, I was faced with the issue > of capturing what the code sends to STDOUT and STDERR. As I have not > found a module to make it easy, I wrote a trivial code to do it. It > is used like this: > >

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Sam Vilain
On Tue, 10 Feb 2004 00:57, Orton, Yves wrote; > Its worth noting that this approach wont actually grab everything > on the tied filehandles.  There are enough ways to bypass the tie > that you have to do a lot more than that to get the majority, and > even then there is stuff that will sti

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Adrian Howard
On Monday, February 9, 2004, at 08:27 pm, Andy Lester wrote: Because: a) I wasn't happy with the API b) I'm a lazy SOB and couldn't find the time to sort it out I'll be glad to help with the second part. Mail me the parts and I'll bundle it up all nice for ya. If you want to play

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Andy Lester
> Because: > a) I wasn't happy with the API > b) I'm a lazy SOB and couldn't find the time to sort it out I'll be glad to help with the second part. Mail me the parts and I'll bundle it up all nice for ya. -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Adrian Howard
On Monday, February 9, 2004, at 06:27 pm, Kineticode Billing wrote: On Feb 9, 2004, at 10:20 AM, Adrian Howard wrote: [snip] Cool. Why isn't this on CPAN? Because: a) I wasn't happy with the API b) I'm a lazy SOB and couldn't find the time to sort it out The new year's resolution

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Kineticode Billing
On Feb 9, 2004, at 10:20 AM, Adrian Howard wrote: I did something similar with Test::Output http://www.quietstars.com/perl/Test-Output-0.01.tar.gz which allows you to do things like: output_is { hello() } "hello world\n", STDOUT, "hello world"; output_isnt { hello() } "goodbye",

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Adrian Howard
On Monday, February 9, 2004, at 02:14 am, David Wheeler wrote: [snip] Perhaps: stdout_is(print STDOUT "hello", "hello", 'print "hello" to STDOUT'); [snip] I did something similar with Test::Output http://www.quietstars.com/perl/Test-Output-0.01.tar.gz which allows you to do things like:

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Adrian Howard
On Monday, February 9, 2004, at 02:08 am, Adriano R. Ferreira wrote: [snip] One of the things I am not confident at is the interplay with modules like Test::More. Where they send their output: STDERR? [snip] Test::Builder dups the filehandles it uses, so as long as it gets loaded first you shoul

RE: Testing output to STDOUT and STDERR

2004-02-09 Thread Orton, Yves
Title: RE: Testing output to STDOUT and STDERR > Though, I must say that I prefer his API.  The above was really just a > quick hack based on what I'd extracted out of the ePerl code base. > > I'd call it something like IO::Capture if I were to CPAN it. > IO::Sei

Re: Testing output to STDOUT and STDERR

2004-02-09 Thread Sam Vilain
On Mon, 09 Feb 2004 14:00, Andy Lester wrote; > > While writing tests for some of my code, I was faced with the issue > > of capturing what the code sends to STDOUT and STDERR. As I have not > > found a module to make it easy, I wrote a trivial code to do it. It > > is used like this: >

Re: Testing output to STDOUT and STDERR

2004-02-08 Thread David Wheeler
On Feb 8, 2004, at 5:52 PM, Adriano R. Ferreira wrote: If it is worthy, there's a bunch of things I would appreciate some feedback on: * does it make sense the use of 'seize' and 'release' as above (I am not an English native speaker and I am not sure). I like them. They're quirky. * What would

Re: Testing output to STDOUT and STDERR

2004-02-08 Thread Lincoln A. Baxter
On Sun, 2004-02-08 at 20:00, Andy Lester wrote: > > While writing tests for some of my code, I was faced with the issue > > of capturing what the code sends to STDOUT and STDERR. As I have not > > found a module to make it easy, I wrote a trivial code to do it. It > > is used like this: > > I'm no

Re: Testing output to STDOUT and STDERR

2004-02-08 Thread Adriano R. Ferreira
The thing I want to test is the output of my piece of code to STDOUT and STDERR. The kind of code I am writing is just like the output of a compiler which outputs to STDOUT and sends warnings to STDERR. Of course, there won't be warnings when the input is correct. In the tests for this code, I woul

Re: Testing output to STDOUT and STDERR

2004-02-08 Thread Andy Lester
> While writing tests for some of my code, I was faced with the issue > of capturing what the code sends to STDOUT and STDERR. As I have not > found a module to make it easy, I wrote a trivial code to do it. It > is used like this: I'm not sure what you're actually trying to test. If you're testi