()
| 1263 | |
| 1264 | #[test] |
| 1265 | fn test_hash_file_contents() { |
| 1266 | use tempfile::TempDir; |
| 1267 | |
| 1268 | let temp_dir = TempDir::new().unwrap(); |
| 1269 | let file_path = temp_dir.path().join("test.txt"); |
| 1270 | |
| 1271 | std::fs::write(&file_path, b"Hello, world!").unwrap(); |
| 1272 | |
| 1273 | let hash = hash_file_contents(&file_path).unwrap(); |
| 1274 | let expected = Hash::of(b"Hello, world!"); |
| 1275 | |
| 1276 | assert_eq!(hash, expected); |
| 1277 | } |
| 1278 | |
| 1279 | #[test] |
| 1280 | fn test_collect_working_copy_files() { |
nothing calls this directly
no test coverage detected