mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
add production mode tests
Due to the inability to detect warnings in REPL tests, I implemented running something very similar, but with the -prod flag enabled. (See https://github.com/vlang/v/pull/2536) There is also a minor change in os.walk_ext to not add duplicated path separators: /path//file.ext -> /path/file.ext
This commit is contained in:
committed by
Alexander Medvednikov
parent
da574640e7
commit
ab37081f02
@@ -856,11 +856,12 @@ pub fn walk_ext(path, ext string) []string {
|
||||
}
|
||||
mut files := os.ls(path) or { panic(err) }
|
||||
mut res := []string
|
||||
separator := if path.ends_with(path_separator) { '' } else { path_separator}
|
||||
for i, file in files {
|
||||
if file.starts_with('.') {
|
||||
continue
|
||||
}
|
||||
p := path + path_separator + file
|
||||
p := path + separator + file
|
||||
if os.is_dir(p) {
|
||||
res << walk_ext(p, ext)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user