Skip to content

Commit

Permalink
use more descriptive expect proc name
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 7, 2023
1 parent c36da90 commit 8205b02
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/tools/vcreate/new_no_arg.expect
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set timeout 10
set v_root [lindex $argv 0]
set project_name [lindex $argv 1]

proc assert {expect_ {send_ ""}} {
proc expect_then_send {expect_ {send_ ""}} {
expect $expect_ {
if {$send_ != ""} {
send $send_
Expand All @@ -18,11 +18,11 @@ proc assert {expect_ {send_ ""}} {

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_then_send "Input your project name: " "$project_name\r"
expect_then_send "Input your project description: " "My awesome V project.\r"
expect_then_send "Input your project version: (0.0.0) " "0.1.0\r"
expect_then_send "Input your project license: (MIT) " "GPL\r"
expect_then_send "Initialising ..."
expect_then_send "Complete!"

expect eof

0 comments on commit 8205b02

Please sign in to comment.