Skip to content

Commit cec0852

Browse files
committed
test: unique inodes
1 parent f72fb56 commit cec0852

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tests/deduplicate_hardlinks.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,27 @@ fn complex_tree_with_shared_and_unique_files_with_deduplication() {
259259
);
260260
}
261261

262+
// All entries have unique inodes
263+
{
264+
let actual: Vec<_> = tree
265+
.shared
266+
.details
267+
.as_ref()
268+
.expect("get details")
269+
.iter()
270+
.map(|item| item.ino)
271+
.map(u64::from)
272+
.collect();
273+
let expected = actual
274+
.clone()
275+
.into_iter()
276+
.collect::<HashSet<_>>()
277+
.into_iter()
278+
.collect::<Vec<_>>()
279+
.into_sorted();
280+
assert_eq!(actual, expected);
281+
}
282+
262283
// No files from no-hardlinks should appear
263284
{
264285
let actual = tree

0 commit comments

Comments
 (0)