mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
tools.vcreate: rework cli arg handling to extend scaffolding and fix issues (#19889)
This commit is contained in:
parent
9308bcd48a
commit
e9258c2a08
16 changed files with 237 additions and 139 deletions
17
cmd/tools/vcreate/tests/init_with_model_arg.expect
Executable file
17
cmd/tools/vcreate/tests/init_with_model_arg.expect
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env expect
|
||||
|
||||
set timeout 3
|
||||
|
||||
# Pass v_root as arg, since we chdir into a temp directory during testing and create a project there.
|
||||
set v_root [lindex $argv 0]
|
||||
set model [lindex $argv 1]
|
||||
|
||||
spawn $v_root/v init $model
|
||||
|
||||
expect "Input your project description: " { send "My Awesome V Application.\r" } timeout { exit 1 }
|
||||
expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 }
|
||||
expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
|
||||
expect "Initialising ..." {} timeout { exit 1 }
|
||||
# The completion message is verified in `vcreate_init_test.v`.
|
||||
|
||||
expect eof
|
Loading…
Add table
Add a link
Reference in a new issue