diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index 38b409528a..0aca8eb2d6 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -150,9 +150,9 @@ fn worker_trunner(mut p sync.PoolProcessor, idx int, thread_id int) voidptr { } tls_bench.no_cstep = true dot_relative_file := p.get_string_item(idx) - mut relative_file := dot_relative_file + mut relative_file := dot_relative_file.replace('./', '') if ts.root_relative { - relative_file = relative_file.replace(ts.vroot + os.path_separator, '').replace('./', '') + relative_file = relative_file.replace(ts.vroot + os.path_separator, '') } file := os.real_path(relative_file) // Ensure that the generated binaries will be stored in the temporary folder. diff --git a/vlib/v/tests/inout/compiler_test.v b/vlib/v/tests/inout/compiler_test.v index f89f2b2710..3d4c3e5bab 100644 --- a/vlib/v/tests/inout/compiler_test.v +++ b/vlib/v/tests/inout/compiler_test.v @@ -7,6 +7,7 @@ fn test_all() { mut total_errors := 0 vexe := os.getenv('VEXE') vroot := os.dir(vexe) + os.chdir(vroot) diff_cmd := util.find_working_diff_command() or { '' } diff --git a/vlib/v/tests/vmod_parser_test.v b/vlib/v/tests/vmod_parser_test.v index 3a07155c33..e20f81ffbf 100644 --- a/vlib/v/tests/vmod_parser_test.v +++ b/vlib/v/tests/vmod_parser_test.v @@ -1,6 +1,9 @@ import vmod +import os + fn test_from_file() { + os.chdir(os.dir(os.getenv('VEXE'))) data := vmod.from_file('./v.mod') or { panic(err) }