Skip to content

Commit 42d99ba

Browse files
authored
tools: sort the match results in the vwhere test, to make it less flaky (#22033)
1 parent d7bdb72 commit 42d99ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/tools/vwhere/vwhere_test.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ fn test_find_in_dir_recursive() {
190190
mut fdr := Finder{}
191191
fdr.configure_from_arguments(args)
192192
fdr.search_for_matches()
193+
// the order of matches is not guaranteed.
194+
// sorting by line number makes the result more deterministic.
195+
fdr.matches.sort(a.line < b.line)
193196
dump(fdr.matches)
194197

195198
assert fdr.matches == [

0 commit comments

Comments
 (0)