From: Ken I. <jki...@mo...> - 2000-11-21 19:29:51
|
On Tue, Nov 21, 2000 at 01:09:12PM +0100, Roland Giersig wrote: > Ken Irving wrote: > > I saw a note on clpm mentioning Expect v1.08, so upgraded to it, but > > I find that my scripts using v1.07 fail to work properly. I'm in the > > process of tracking down the difficulty(/ies), and could let you know > > what I find, if that would be helpful. > > Yes, that would be nice, so that I either can fix the incompatibilities > or at least document them. Could you send me some short example > script(s) > that's failing now? Maybe I can spot obvious problems. I'm also trying > to build up a basic testsuite, and backward-compatibility is > important. #!/usr/bin/perl -w # checkdialtone -- briefly listen to the dialtone use strict; # use lib '/tmp/Expect-1.08/'; use Expect; my $cu = Expect->spawn( '/usr/bin/cu', '--port serial1') or die 'unable to open cu'; $cu->log_stdout(0); # avoid having "Connected" echo to STDOUT unless ( $cu->expect(10, 'Connected')) { die 'failed connection in cu, ' . $cu->exp_error() . "\n"; } print $cu "atm1l0d\r"; sleep 0; print $cu "atz\r"; __END__ Under v1.08 it's timing out in the expect() method: ken@moffit:~/src/perl/try $ testExpect.pl failed connection in cu, 3:Child PID 10025 exited with status 256 -- Ken Irving <jki...@mo...> |