From ff04c4a131efb6f1d7625afebb59981b480f9c54 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 14 Oct 2023 17:26:59 -0400 Subject: [PATCH] Sort files in a compare_all_org_document. --- src/bin_foreign_document_test.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin_foreign_document_test.rs b/src/bin_foreign_document_test.rs index 75261e6c..c9477efd 100644 --- a/src/bin_foreign_document_test.rs +++ b/src/bin_foreign_document_test.rs @@ -107,7 +107,7 @@ fn compare_group, F: Fn() -> I, I: Iterator>( fn compare_all_org_document>(root_dir: P) -> impl Iterator { let root_dir = root_dir.as_ref(); - let test_files = WalkDir::new(root_dir) + let mut test_files = WalkDir::new(root_dir) .into_iter() .filter(|e| match e { Ok(dir_entry) => { @@ -121,6 +121,7 @@ fn compare_all_org_document>(root_dir: P) -> impl Iterator, _>>() .unwrap(); + test_files.sort_by_cached_key(|test_file| PathBuf::from(test_file.path())); let test_configs: Vec<_> = test_files .into_iter() .map(|test_file| {