I have some ncurses apps that I need to automate to test repeatedly. I am placing the "sleep" command between "send" commands. However, what i see is that all the sleep's are executed in the beginning before the screen loads. expect concatenates the sends (I see that at the screen bottom during sleep) then issues them together.
I have tried sending all keys with "send -s" or "send -h". That marginally helps. I've replaced "-f" on line 1 with "-b" - again a tiny difference.
Why isn't "sleep" pausing at the right time. Incidentally, my programs have a getc() loop, so i can't use "expect" command. I tried that too.
#!/usr/bin/expect -f
spawn ruby testsplit.rb
#expect
set send_human {3 3 5 5 7}
set send_slow {10 1}
exp_send -s -- "--"
exec sleep 3
send -s "+"
send -s "="
sleep 1
send -h -- "-"
send -h -- "-"
sleep 1
send -h -- "v"
interact