Skip to content

Commit f72fb56

Browse files
committed
test: sorted
1 parent 8b5c04f commit f72fb56

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/deduplicate_hardlinks.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,23 @@ fn complex_tree_with_shared_and_unique_files_with_deduplication() {
242242
assert_eq!(actual, None);
243243
}
244244

245+
// The entries are sorted by their inodes
246+
{
247+
let inodes: Vec<_> = tree
248+
.shared
249+
.details
250+
.as_ref()
251+
.expect("get details")
252+
.iter()
253+
.map(|item| item.ino)
254+
.map(u64::from)
255+
.collect();
256+
assert!(
257+
inodes.is_sorted(),
258+
"Expecting the entries to be sorted by inodes, but they weren't: {inodes:?}",
259+
);
260+
}
261+
245262
// No files from no-hardlinks should appear
246263
{
247264
let actual = tree

0 commit comments

Comments
 (0)