v2 / cmd / tools / vcreate / tests / init_with_model_arg.expect
17 lines · 12 sloc · 610 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]
7set model [lindex $argv 1]
8
9spawn $v_root/v init $model
10
11expect "Input your project description: " { send "My Awesome V Application.\r" } timeout { exit 1 }
12expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 }
13expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
14expect "Initialising ..." {} timeout { exit 1 }
15# The completion message is verified in `vcreate_init_test.v`.
16
17expect eof
18