Skip to content

Commit

Permalink
v.util: simplify vtest (#21013)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Mar 13, 2024
1 parent c29b64e commit 7ffd917
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions vlib/v/util/vtest/vtest.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,9 @@ pub fn filter_vtest_only(paths []string, config FilterVTestConfig) []string {
if config.fix_slashes {
file = file.replace('\\', '/')
}
if patterns.len > 0 {
mut found := 0
for okpat in patterns {
if file.contains(okpat) {
found++
break
}
}
if found == 0 {
continue
}
if patterns.len > 0 && patterns.any(file.contains(it)) {
res << file
}
res << file
}
return res
}

0 comments on commit 7ffd917

Please sign in to comment.