mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: add test for VDOC_SORT=false ./v doc file.v
This commit is contained in:
8
cmd/tools/vdoc/tests/testdata/unsorted/main.out
vendored
Normal file
8
cmd/tools/vdoc/tests/testdata/unsorted/main.out
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
module main
|
||||
|
||||
const omega = 3 // should be first
|
||||
const alpha = 5 // should be in the middle
|
||||
const beta = 2 // should be at the end
|
||||
fn abc()
|
||||
fn def()
|
||||
fn xyz()
|
||||
11
cmd/tools/vdoc/tests/testdata/unsorted/main.unsorted.out
vendored
Normal file
11
cmd/tools/vdoc/tests/testdata/unsorted/main.unsorted.out
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
module main
|
||||
|
||||
const omega = 3 // should be first
|
||||
const alpha = 5 // should be in the middle
|
||||
const beta = 2 // should be at the end
|
||||
fn def()
|
||||
def - should be first
|
||||
fn xyz()
|
||||
xyz - should be in the middle
|
||||
fn abc()
|
||||
abc - should be last
|
||||
20
cmd/tools/vdoc/tests/testdata/unsorted/main.v
vendored
Normal file
20
cmd/tools/vdoc/tests/testdata/unsorted/main.v
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
pub const omega = 3 // should be first
|
||||
|
||||
pub const alpha = 5 // should be in the middle
|
||||
|
||||
pub const beta = 2 // should be at the end
|
||||
|
||||
// def - should be first
|
||||
pub fn def() {
|
||||
println(1)
|
||||
}
|
||||
|
||||
// xyz - should be in the middle
|
||||
pub fn xyz() {
|
||||
println(2)
|
||||
}
|
||||
|
||||
// abc - should be last
|
||||
pub fn abc() {
|
||||
println(3)
|
||||
}
|
||||
Reference in New Issue
Block a user