in reply to Test::Expect : expect_send() dies

I believe (at least on my redhat/bash prompt i just tried) that read sends the prompt test (e.g. 'Enter Foo') to STDERR ... Does Test::Expect look at STDERR or just STDOUT? I couldn't tell from a quick look at the docs.

To test this theory, i would try to change your silly program to be (note my use of bash -- i don't know redirecting syntax in ksh):
#!/bin/bash read -r var1?"Enter foo " 2>&1 # is the read syntax here right for b +ash?? echo $var1
Alternatively, the error_expect() method in Expect::Simple (what Test::Expect is build on) might be relevant, but not sure..

Replies are listed 'Best First'.
Re^2: Test::Expect : expect_send() dies
by Hesky (Initiate) on Jul 07, 2005 at 15:21 UTC

    The above has not resolve the problem expect_send still hangs.