v2 / cmd / tools / vcreate / tests / init.expect
15 lines · 10 sloc · 498 bytes · e2e5cf8db56f3562c7baa735061690be936bdf3e
Raw
1#!/usr/bin/env expect
2
3set timeout 10
4
5# Pass v_root as arg, since we chdir into a temp directory during testing and create a project there.
6set v_root [lindex $argv 0]
7
8spawn $v_root/v init
9
10expect "Input your project description: " { send "\r" } timeout { exit 1 }
11expect "Input your project version: (0.0.0) " { send "\r" } timeout { exit 1 }
12expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
13# The completion message is verified in `vcreate_init_test.v`.
14
15expect eof
16