v2 / examples / password / tests / correct.expect
12 lines · 8 sloc · 377 bytes · 0fb38edcb67cc067efc7945318bd322760bc9b54
Raw
1#!/usr/bin/env expect
2
3set timeout 3
4set v_root [exec sh -c "git rev-parse --show-toplevel"]
5
6spawn $v_root/v run $v_root/examples/password/password.v
7
8expect "Enter your password : " { send "Sample\r" } timeout { exit 1 }
9expect "Confirm password : " { send "Sample\r" } timeout { exit 1 }
10expect "Password confirmed! You entered: Sample ." {} timeout { exit 1 }
11
12expect eof
13