Subject: B20.1: Problem with expect (NT)
From: Giovanni COSENZA <[email-masked]>
To: [email-masked]
Date: Fri, 21 May 1999 11:12:50 +0200

I'm using the DejaGnu program and it works well but with some command it
jams and it does not give back the hand.

I have tried to simplify the source and to detail the problem and this
is the result.

The following program works fine.
It has to be executed under cygwin "sh" or "bash" in the following way :

$ expect test.exp

--------------------- TEST.EXP ----------------------------------
#
# Test.exp
#
spawn /bin/sh
set prompt "EUREKA"
send "export PS1=\"${prompt}\"\n"
expect {
    $prompt {
        puts "PROMPT"
    }
}
send
"012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901\r"

expect $prompt

exit

----------------------- END TET.EXP
------------------------------------------

But if you add one or more characters (> 161 chars.)  in the SEND string
the expect program jams.

Is it normal ?
Is it possible to execute command with more than 162 chars.?
Is it a buffer overflow problem?

I'd like to resolve this problem because most command I use are very
long.

Thanks.

--
Want to unsubscribe from this list?
Send a message to [email-masked]