v / examples / password / tests / output_from_expect_arg.expect
12 lines · 8 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# Send expected output as arg to re-use the script for testing incorrect values.
6set expect_ [lindex $argv 0]
7
8spawn $v_root/v run $v_root/examples/password/password.v
9
10expect $expect_ {} timeout { exit 1 }
11
12expect eof
13