We don't bite newbies here... much | |
PerlMonks |
Testing a subroutine with STDINby mulander (Monk) |
on Oct 28, 2005 at 14:16 UTC ( [id://503649]=perlquestion: print w/replies, xml ) | Need Help?? |
mulander has asked for the wisdom of the Perl Monks concerning the following question: Hello fellow Monks. I am wondering how can one test a subroutine that requires input from STDIN somewhere in the middle of the sub. I searched for some function that could test such a sub in Test::More but did not found any that could let me scheduele what to input when the test sees <STDIN>. I just want to queue the input that normally a user would type in, so the test can run without the tester substituting the user. Maybe any one could guide me where to search for such a sub, or should I test it in another way? Edited by planetscape - formatting and s/subrutine/subroutine/; 2005-10-28 Retitled by planetscape, as per Monastery guidelines
Back to
Seekers of Perl Wisdom
|
|