From 81418b7fe55005305a3b4de6cb42c96efc58d73c Mon Sep 17 00:00:00 2001 From: gym603 Date: Fri, 10 May 2024 02:12:06 +0800 Subject: [PATCH] tests: fix dependence on presence of vlib/bitfield/_docs in vdoc_file_test.v (#21478) --- cmd/tools/vdoc/vdoc_file_test.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tools/vdoc/vdoc_file_test.v b/cmd/tools/vdoc/vdoc_file_test.v index 13a9cdf5d3..7cdf143cba 100644 --- a/cmd/tools/vdoc/vdoc_file_test.v +++ b/cmd/tools/vdoc/vdoc_file_test.v @@ -98,11 +98,12 @@ fn test_out_path() { os.rmdir_all(test_path) or {} } os.chdir(test_path)! - os.cp_all(os.join_path(vroot, 'vlib', small_pure_v_vlib_module), test_mod_path, true) or {} + mod_path := os.join_path(vroot, 'vlib', small_pure_v_vlib_module) + os.cp_all(mod_path, test_mod_path, true) or {} // Relative input with default output path. os.execute_opt('${vexe} doc -f html -m ${small_pure_v_vlib_module}')! - output_path := os.join_path(test_mod_path, '_docs', '${small_pure_v_vlib_module}.html') + output_path := os.join_path(mod_path, '_docs', '${small_pure_v_vlib_module}.html') assert os.exists(output_path), output_path // Custom out path (no `_docs` subdir).