diff --git a/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v b/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v index 681a7de0db..0de303c2bb 100644 --- a/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v +++ b/vlib/v/tests/multiple_paths_in_vmodules/vmodules_overrides_test.v @@ -10,6 +10,8 @@ const basepath = os.real_path(os.join_path(vroot, 'vlib', 'v', 'tests', 'multipl const mainvv = os.join_path(basepath, 'main.vv') +const cmd = '${os.quoted_path(vexe)} run ${os.quoted_path(mainvv)}' + fn test_vexe_is_set() { assert vexe != '' println('vexe: ${vexe}') @@ -18,11 +20,9 @@ fn test_vexe_is_set() { fn test_compiling_without_vmodules_fails() { os.chdir(vroot) or {} os.setenv('VMODULES', '', true) - cmd := '${os.quoted_path(vexe)} run ${os.quoted_path(mainvv)}' dump(cmd) res := os.execute(cmd) - assert res.exit_code == 1 - dump(res) + assert res.exit_code == 1, res.output assert res.output.trim_space().contains('builder error: cannot import module "yyy" (not found)') } @@ -30,7 +30,8 @@ fn test_compiling_with_vmodules_works() { os.chdir(vroot) or {} vmpaths := ['path1', 'path2', 'path3'].map(os.join_path(basepath, it)) os.setenv('VMODULES', vmpaths.join(os.path_delimiter), true) - res := os.execute('${os.quoted_path(vexe)} run ${os.quoted_path(mainvv)}') - assert res.exit_code == 0 + dump(cmd) + res := os.execute(cmd) + assert res.exit_code == 0, res.output assert res.output.trim_space() == "['x', 'y', 'z']" }