| 1 | #!/usr/bin/env expect |
| 2 | |
| 3 | set timeout 10 |
| 4 | |
| 5 | # Pass v_root as arg, since we chdir into a temp directory during testing and create a project there. |
| 6 | set v_root [lindex $argv 0] |
| 7 | set model [lindex $argv 1] |
| 8 | |
| 9 | spawn $v_root/v init $model |
| 10 | |
| 11 | expect "Input your project description: " { send "My Awesome V Application.\r" } timeout { exit 1 } |
| 12 | expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 } |
| 13 | expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 } |
| 14 | expect "Initialising ..." {} timeout { exit 1 } |
| 15 | # The completion message is verified in `vcreate_init_test.v`. |
| 16 | |
| 17 | expect eof |
| 18 | |