in reply to Pre-empting STDIN during Testing
This looks like what `expect` / Expect.pm is made for. It talks to the unit under test, waiting for a string and answering with another one.
Refactoring the verification into subroutines might be the best long term solution. Do you know that your program never ever will use a different form of input? What if you need to verify e. g. XML file input?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pre-empting STDIN during Testing
by jkeenan1 (Deacon) on Feb 15, 2005 at 20:07 UTC | |
by dragonchild (Archbishop) on Feb 15, 2005 at 20:11 UTC |