From 42d99ba872f61cbdfcd63b65b7dcf2945d0b81de Mon Sep 17 00:00:00 2001 From: Kim Shrier Date: Sun, 11 Aug 2024 16:11:21 -0600 Subject: [PATCH] tools: sort the match results in the vwhere test, to make it less flaky (#22033) --- cmd/tools/vwhere/vwhere_test.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tools/vwhere/vwhere_test.v b/cmd/tools/vwhere/vwhere_test.v index e72b3c090c..8b33a5566e 100644 --- a/cmd/tools/vwhere/vwhere_test.v +++ b/cmd/tools/vwhere/vwhere_test.v @@ -190,6 +190,9 @@ fn test_find_in_dir_recursive() { mut fdr := Finder{} fdr.configure_from_arguments(args) fdr.search_for_matches() + // the order of matches is not guaranteed. + // sorting by line number makes the result more deterministic. + fdr.matches.sort(a.line < b.line) dump(fdr.matches) assert fdr.matches == [