mirror of
https://github.com/vlang/v.git
synced 2025-09-15 10:27:19 -04:00
tests: fix quoted path bug in cmd/tools/vdoc/tests/vdoc_file_test.v, that effectively disabled most of the tests there
This commit is contained in:
parent
50f3ac4968
commit
20c9ef21e5
@ -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
|
||||
|
12
cmd/tools/vdoc/tests/testdata/basic/main.out
vendored
12
cmd/tools/vdoc/tests/testdata/basic/main.out
vendored
@ -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()
|
||||
|
@ -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.
|
||||
|
||||
[94mmodule[39m [32mmain[39m
|
||||
|
||||
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.
|
||||
[94mconst[39m omega = [94m3[39m [90m// should be first[39m
|
||||
[94mconst[39m alpha = [94m5[39m [90m// should be in the middle[39m
|
||||
[94mconst[39m beta = [94m2[39m [90m// should be at the end[39m
|
||||
|
@ -1,5 +1,5 @@
|
||||
<section id="readme_main" class="doc-node">
|
||||
<div class="title"><h1> main <a href="#readme_main">#</a></h1></div><p>The autogenerated documentation for <code>builtin</code> functions is lacking, so for these functions, please refer to the <a href="https://github.com/vlang/v/blob/master/doc/docs.md">official V documentation</a>.</p><p>Linebreaks are set deliberately to test handling of spaces in multi-line doc comments. Related PR: <a href="https://github.com/vlang/v/pull/19938">https://github.com/vlang/v/pull/19938</a>.</p>
|
||||
<div class="title"><h1> main <a href="#readme_main">#</a></h1></div>
|
||||
|
||||
</section>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user