This commit is contained in:
llama 2025-11-19 08:55:10 +08:00
parent 667c21c593
commit ef69b9c657
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -498,8 +498,14 @@ mod test {
"test.mp3"
);
// different contents
// different contents, filenames differ only by case
let h2 = sha1_of_data(b"hello1");
assert_eq!(
add_data_to_folder_uniquely(dpath, "Test.mp3", b"hello1", h2).unwrap(),
"test-88fdd585121a4ccb3d1540527aee53a77c77abb8.mp3"
);
// same contents, filenames differ only by case
assert_eq!(
add_data_to_folder_uniquely(dpath, "test.mp3", b"hello1", h2).unwrap(),
"test-88fdd585121a4ccb3d1540527aee53a77c77abb8.mp3"