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
Original title: 'Re: Testing a subrutine with STDIN'
In reply to Testing a subroutine with STDIN by mulander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |