1
0
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:
Delyan Angelov
2023-03-30 16:48:21 +03:00
parent b40aa4ffa9
commit 822acd78cb
4 changed files with 95 additions and 29 deletions

View 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()

View 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

View 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)
}