✅ Add: test
This commit is contained in:
parent
524091ff90
commit
8d4d4ceec4
1 changed files with 20 additions and 0 deletions
20
vss_test.v
Normal file
20
vss_test.v
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
module main
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
fn normalise_paths(paths []string) []string {
|
||||||
|
mut res := paths.map(it.replace(os.path_separator, '/'))
|
||||||
|
res.sort()
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_get_paths() {
|
||||||
|
testpath := "testfiles"
|
||||||
|
mds := normalise_paths(get_paths(testpath))
|
||||||
|
assert mds.len == 2
|
||||||
|
assert mds == [
|
||||||
|
"testfiles/aaa.md",
|
||||||
|
"testfiles/bbb.md",
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue