()
| 335 | |
| 336 | #[test] |
| 337 | fn test_write_file_binary() { |
| 338 | let (dir, fs) = temp_fs(); |
| 339 | let binary_data: Vec<u8> = (0..=255).collect(); |
| 340 | |
| 341 | { |
| 342 | let mut writer = fs.write_file("binary.bin", Inode::new(1)).unwrap(); |
| 343 | writer.write_all(&binary_data).unwrap(); |
| 344 | } |
| 345 | |
| 346 | let contents = std::fs::read(dir.path().join("binary.bin")).unwrap(); |
| 347 | assert_eq!(contents, binary_data); |
| 348 | } |
| 349 | |
| 350 | #[test] |
| 351 | fn test_file_writer_inode() { |
nothing calls this directly
no test coverage detected