-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/expect | ||
|
||
set timeout 10 | ||
# Pass v_root as arg, since we chdir into a temp directoy during testing and create the project there. | ||
set v_root [lindex $argv 0] | ||
set project_name [lindex $argv 1] | ||
|
||
proc assert {expect_ {send_ ""}} { | ||
expect $expect_ { | ||
if {$send_ != ""} { | ||
send $send_ | ||
} | ||
} timeout { | ||
puts "!= $expect_" | ||
exit 1 | ||
} | ||
} | ||
|
||
spawn $v_root/v run $v_root/cmd/tools/vcreate/ new | ||
|
||
assert "Input your project name: " "$project_name\r" | ||
assert "Input your project description: " "My awesome V project.\r" | ||
assert "Input your project version: (0.0.0) " "0.1.0\r" | ||
assert "Input your project license: (MIT) " "GPL\r" | ||
assert "Initialising ..." | ||
assert "Complete!" | ||
|
||
expect eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters