File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ fn test_out_path() {
7272 test_path := os.join_path (os.vtmp_dir (), 'vdoc_test_${rand.ulid()} ' )
7373 test_mod_path := os.join_path (test_path, small_pure_v_vlib_module)
7474 os.mkdir_all (test_path)!
75+ // Sentinel v.mod so that vdoc's get_parent_mod() stops climbing here instead of
76+ // picking up stray .v files in ancestor tmp dirs (e.g. /private/tmp on macOS).
77+ os.write_file (os.join_path (test_path, 'v.mod' ), "Module { name: 'vdoc_test' }\n " )!
7578 defer {
7679 os.chdir (vroot) or {}
7780 os.rmdir_all (test_path) or {}
@@ -82,7 +85,7 @@ fn test_out_path() {
8285
8386 // Relative input with default output path.
8487 os.execute_opt ('${vexe} doc -f html -m ${small_pure_v_vlib_module} ' )!
85- output_path := os.join_path (mod_path , '_docs' , '${small_pure_v_vlib_module} .html' )
88+ output_path := os.join_path (test_mod_path , '_docs' , '${small_pure_v_vlib_module} .html' )
8689 assert os.exists (output_path), output_path
8790
8891 // Custom out path (no `_docs` subdir).
You can’t perform that action at this time.
0 commit comments