()
| 1233 | |
| 1234 | #[test] |
| 1235 | fn test_hash_file_contents() { |
| 1236 | use tempfile::TempDir; |
| 1237 | |
| 1238 | let temp_dir = TempDir::new().unwrap(); |
| 1239 | let file_path = temp_dir.path().join("test.txt"); |
| 1240 | |
| 1241 | std::fs::write(&file_path, b"Hello, world!").unwrap(); |
| 1242 | |
| 1243 | let hash = hash_file_contents(&file_path).unwrap(); |
| 1244 | let expected = Hash::of(b"Hello, world!"); |
| 1245 | |
| 1246 | assert_eq!(hash, expected); |
| 1247 | } |
| 1248 | |
| 1249 | #[test] |
| 1250 | fn test_collect_working_copy_files() { |
nothing calls this directly
no test coverage detected