diff --git a/cmd/tools/vdoc/tests/testdata/basic/main.comments.out b/cmd/tools/vdoc/tests/testdata/basic/main.comments.out index 5f4a0b4f27..cde033ffab 100644 --- a/cmd/tools/vdoc/tests/testdata/basic/main.comments.out +++ b/cmd/tools/vdoc/tests/testdata/basic/main.comments.out @@ -1,13 +1,9 @@ module main -const ( - source_root = 'temp' // some const - another = int(5) // -) -const ( - windowpos_undefined_mask = C.SDL_WINDOWPOS_UNDEFINED_MASK // 0x1FFF0000u - windowpos_undefined = C.SDL_WINDOWPOS_UNDEFINED // -) +const source_root = 'temp' // some const +const another = int(5) +const windowpos_undefined_mask = C.SDL_WINDOWPOS_UNDEFINED_MASK // 0x1FFF0000u Used to indicate that you don't care what the window position is. +const windowpos_undefined = C.SDL_WINDOWPOS_UNDEFINED fn funky() funky - comment for function below diff --git a/cmd/tools/vdoc/tests/testdata/basic/main.out b/cmd/tools/vdoc/tests/testdata/basic/main.out index 1f053ec9ec..dd6e4f4515 100644 --- a/cmd/tools/vdoc/tests/testdata/basic/main.out +++ b/cmd/tools/vdoc/tests/testdata/basic/main.out @@ -1,11 +1,7 @@ module main -const ( - source_root = 'temp' // some const - another = int(5) // -) -const ( - windowpos_undefined_mask = C.SDL_WINDOWPOS_UNDEFINED_MASK // 0x1FFF0000u - windowpos_undefined = C.SDL_WINDOWPOS_UNDEFINED // -) +const source_root = 'temp' // some const +const another = int(5) +const windowpos_undefined_mask = C.SDL_WINDOWPOS_UNDEFINED_MASK // 0x1FFF0000u +const windowpos_undefined = C.SDL_WINDOWPOS_UNDEFINED fn funky() diff --git a/cmd/tools/vdoc/tests/testdata/output_formats/main.ansi b/cmd/tools/vdoc/tests/testdata/output_formats/main.ansi index c3ae88ea1d..16afcacf36 100644 --- a/cmd/tools/vdoc/tests/testdata/output_formats/main.ansi +++ b/cmd/tools/vdoc/tests/testdata/output_formats/main.ansi @@ -1,13 +1,6 @@ -The autogenerated documentation for builtin functions is lacking, so for these -functions, please refer to the -official V documentation. -Linebreaks are set deliberately to test handling of spaces in multi-line doc comments. -Related PR: https://github.com/vlang/v/pull/19938. + module main - The autogenerated documentation for `builtin` functions is lacking, so for these functions, please refer to the [official V documentation](https://github.com/vlang/v/blob/master/doc/docs.md). - - Linebreaks are set deliberately to test handling of spaces in multi-line doc comments. Related PR: https://github.com/vlang/v/pull/19938. const omega = 3 // should be first const alpha = 5 // should be in the middle const beta = 2 // should be at the end diff --git a/cmd/tools/vdoc/tests/testdata/output_formats/main.html b/cmd/tools/vdoc/tests/testdata/output_formats/main.html index 4a68750d40..522ae1976b 100644 --- a/cmd/tools/vdoc/tests/testdata/output_formats/main.html +++ b/cmd/tools/vdoc/tests/testdata/output_formats/main.html @@ -1,5 +1,5 @@
-

main #

The autogenerated documentation for builtin functions is lacking, so for these functions, please refer to the official V documentation.

Linebreaks are set deliberately to test handling of spaces in multi-line doc comments. Related PR: https://github.com/vlang/v/pull/19938.

+

main #

diff --git a/cmd/tools/vdoc/tests/testdata/output_formats/main.text b/cmd/tools/vdoc/tests/testdata/output_formats/main.text index 907346b03f..cf1cd8a93a 100644 --- a/cmd/tools/vdoc/tests/testdata/output_formats/main.text +++ b/cmd/tools/vdoc/tests/testdata/output_formats/main.text @@ -1,8 +1,5 @@ module main - The autogenerated documentation for `builtin` functions is lacking, so for these functions, please refer to the [official V documentation](https://github.com/vlang/v/blob/master/doc/docs.md). - - Linebreaks are set deliberately to test handling of spaces in multi-line doc comments. Related PR: https://github.com/vlang/v/pull/19938. const omega = 3 // should be first const alpha = 5 // should be in the middle const beta = 2 // should be at the end diff --git a/cmd/tools/vdoc/tests/vdoc_file_test.v b/cmd/tools/vdoc/tests/vdoc_file_test.v index c8a1f4b6cd..23442fc2c0 100644 --- a/cmd/tools/vdoc/tests/vdoc_file_test.v +++ b/cmd/tools/vdoc/tests/vdoc_file_test.v @@ -61,43 +61,43 @@ fn check_path(dir string, tests []string) int { paths := vtest.filter_vtest_only(tests, basepath: vroot) for path in paths { mut fails := 0 - program := os.quoted_path(path) + qpath := os.quoted_path(path) print(path + ' ') fails += check_output( - program: program - cmd: '${vexe} doc ${program}' + program: path + cmd: '${vexe} doc ${qpath}' out_filename: 'main.out' ) fails += check_output( - program: program - cmd: '${vexe} doc -comments ${program}' + program: path + cmd: '${vexe} doc -comments ${qpath}' out_filename: 'main.unsorted.out' should_sort: false ) fails += check_output( - program: program - cmd: '${vexe} doc -comments ${program}' + program: path + cmd: '${vexe} doc -comments ${qpath}' out_filename: 'main.comments.out' ) fails += check_output( - program: program - cmd: '${vexe} doc -readme -comments ${program}' + program: path + cmd: '${vexe} doc -readme -comments ${qpath}' out_filename: 'main.readme.comments.out' ) // test the main 3 different formats: - program_dir := if os.is_file(path) { os.quoted_path(os.dir(path)) } else { program } + program_dir := os.quoted_path(if os.is_file(path) { os.dir(path) } else { path }) fails += check_output( - program: program + program: path cmd: '${vexe} doc -f html -o - -html-only-contents -readme -comments ${program_dir}' out_filename: 'main.html' ) fails += check_output( - program: program + program: path cmd: '${vexe} doc -f ansi -o - -html-only-contents -readme -comments ${program_dir}' out_filename: 'main.ansi' ) fails += check_output( - program: program + program: path cmd: '${vexe} doc -f text -o - -html-only-contents -readme -comments ${program_dir}' out_filename: 'main.text' )