v / examples / readline / tests / readline_from_expect_arg.expect
14 lines · 10 sloc · 313 bytes · 0fb38edcb67cc067efc7945318bd322760bc9b54
Raw
1#!/usr/bin/env expect
2
3set timeout 3
4set v_root [exec sh -c "git rev-parse --show-toplevel"]
5# Use input arguments for send and expect.
6set send_ [lindex $argv 0]
7set expect_ [lindex $argv 1]
8
9spawn $v_root/v run $v_root/examples/readline/readline.v
10
11send $send_
12expect $expect_ {} timeout { exit 1 }
13
14expect eof
15