Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix vcreate_input_test.v on FreeBSD (expect if installed, is in /usr/local/bin there) (fix #19577) #19578

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/tools/vcreate/tests/new_with_model_arg.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3

Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/vcreate/tests/new_with_name_arg.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3

Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/vcreate/tests/new_with_no_arg.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3

Expand Down
15 changes: 12 additions & 3 deletions cmd/tools/vcreate/vcreate_input_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ const (
expect_tests_path = os.join_path(@VMODROOT, 'cmd', 'tools', 'vcreate', 'tests')
)

fn testsuite_begin() {
dump(expect_exe)
dump(test_module_path)
dump(expect_tests_path)
}

fn prepare_test_path() ! {
os.rmdir_all(test_module_path) or {}
os.mkdir_all(test_module_path) or {}
Expand All @@ -25,7 +31,8 @@ fn prepare_test_path() ! {
fn test_new_with_no_arg_input() {
prepare_test_path()!
project_name := 'my_project'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_no_arg.expect')} ${@VMODROOT} ${project_name}')
res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_no_arg.expect')} ${@VMODROOT} ${project_name}')
if res.exit_code != 0 {
assert false, res.output
}
Expand All @@ -46,7 +53,8 @@ fn test_new_with_no_arg_input() {
fn test_new_with_name_arg_input() {
prepare_test_path()!
project_name := 'my_other_project'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_name_arg.expect')} ${@VMODROOT} ${project_name}')
res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_name_arg.expect')} ${@VMODROOT} ${project_name}')
if res.exit_code != 0 {
assert false, res.output
}
Expand All @@ -68,7 +76,8 @@ fn test_new_with_model_arg_input() {
prepare_test_path()!
project_name := 'my_lib'
model := 'lib'
res := os.execute('${os.join_path(expect_tests_path, 'new_with_model_arg.expect')} ${@VMODROOT} ${project_name} ${model}')
res := os.execute('${os.quoted_path(expect_exe)} ${os.join_path(expect_tests_path,
'new_with_model_arg.expect')} ${@VMODROOT} ${project_name} ${model}')
if res.exit_code != 0 {
assert false, res.output
}
Expand Down
2 changes: 1 addition & 1 deletion examples/password/tests/correct.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
Expand Down
2 changes: 1 addition & 1 deletion examples/password/tests/incorrect.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
Expand Down
2 changes: 1 addition & 1 deletion examples/password/tests/output_from_expect_arg.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
Expand Down
2 changes: 1 addition & 1 deletion examples/readline/tests/readline.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
Expand Down
2 changes: 1 addition & 1 deletion examples/readline/tests/readline_from_expect_arg.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/expect
#!/usr/bin/env expect

set timeout 3
set v_root [exec sh -c "git rev-parse --show-toplevel"]
Expand Down
Loading