v/examples/readline/tests/readline.expect

15 lines
303 B
Text
Executable file

#!/usr/bin/expect
set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
spawn $v_root/v run $v_root/examples/readline/readline.v
send "a"
expect "got 97" {} timeout { exit 1 }
send "1"
expect "got 49" {} timeout { exit 1 }
send "q"
expect "Goodbye." {} timeout { exit 1 }
expect eof