I have a script using Term::ReadLine to get input. I'd like to test it by executing it using another script and providing answers from the script test script. I tried IPC::Run with no success but as I notice even simple redirection such as
input.pl < in.txt does not work. Any ideas how to automatically test such a script ? An example of my script that I would like to test looks like this: use strict; use warnings; use Term::ReadLine; my $term = new Term::ReadLine(''); my $first = $term->readline("First: "); my $second = $term->readline("Second: "); print "================\n"; print "First: $first\n"; print "Second: $second\n"; thanks in advance Gabor