Re: testing a shell command which prompts for output?

2004-10-16 Thread Michael G Schwern
On Sun, 17 Oct 2004 01:12:45 + (UTC), Mark Stosberg <[EMAIL PROTECTED]> wrote: > It also worked. Here's what I used: > > `echo 'y' | my_shell_cmd` > > I'm sure there's some other cooler way, but this works well enough for me. Eventually you'll want something more flexible and portable. You

Re: testing a shell command which prompts for output?

2004-10-16 Thread Danny R. Faught
Mark Stosberg wrote: `echo 'y' | my_shell_cmd` I'm sure there's some other cooler way, but this works well enough for me. If it needs something fancier, like a pseudoterminal, you can use the Expect module (e.g., testing the Unix passwd program requires this). But if the simple echo works, keep i

Re: testing a shell command which prompts for output?

2004-10-16 Thread Mark Stosberg
On 2004-10-17, Andy Lester <[EMAIL PROTECTED]> wrote: > > On Oct 16, 2004, at 8:02 PM, Mark Stosberg wrote: > >> How can I write an automate test for a shell command that prompts for >> output. I first tried just using backticks, but that hangs waiting for >> input. > > Will it take its input from

Re: testing a shell command which prompts for output?

2004-10-16 Thread Andy Lester
On Oct 16, 2004, at 8:02 PM, Mark Stosberg wrote: How can I write an automate test for a shell command that prompts for output. I first tried just using backticks, but that hangs waiting for input. Will it take its input from STDIN? If so, pipe stdin to it. xox,o Andy -- Andy Lester => [EMAIL PROT

testing a shell command which prompts for output?

2004-10-16 Thread Mark Stosberg
How can I write an automate test for a shell command that prompts for output. I first tried just using backticks, but that hangs waiting for input. Thanks, Mark -- http://mark.stosberg.com/

CPAN smoking with cpansmoke and CPAN::Nargile

2004-10-16 Thread Gabor Szabo
Good evening, I am trying to use cpansmoke but I have a couple of issues 1) How can I say if I don't want to test a class of modules ? e.g. non of the Win32::* modules as I am on linux no Oracle related modules as I have no Oracle etc. 2) How can I run smoking on a machine th

Re: Test::Harness with modules that output to STDOUT

2004-10-16 Thread Michael G Schwern
On Tue, 24 Aug 2004 17:47:42 -0700 (PDT), Ovid <[EMAIL PROTECTED]> wrote: > --- Peter Kay <[EMAIL PROTECTED]> wrote: > > Ok, what's the elegent way to ignore/dispose of the output the tested > > module produces? > > What I do whenever this happens is to move the printing code to a subroutine > or

Re: Test::Harness with modules that output to STDOUT

2004-10-16 Thread Michael G Schwern
On Tue, 24 Aug 2004 11:04:50 -0400, Peter Kay <[EMAIL PROTECTED]> wrote: > Ok, what's the elegent way to ignore/dispose of the output the tested > module produces? Tie STDOUT. Look at Test::More's own test suite for examples. http://search.cpan.org/src/MSCHWERN/Test-Simple-0.49/t/lib/TieOut.pm