Sort files in a compare_all_org_document.

This commit is contained in:
Tom Alexander 2023-10-14 17:26:59 -04:00
parent 00611e05c2
commit ff04c4a131
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,7 @@ fn compare_group<N: Into<String>, F: Fn() -> I, I: Iterator<Item = TestConfig>>(
fn compare_all_org_document<P: AsRef<Path>>(root_dir: P) -> impl Iterator<Item = TestConfig> {
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<P: AsRef<Path>>(root_dir: P) -> impl Iterator<Item =
})
.collect::<Result<Vec<_>, _>>()
.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| {