()
| 317 | |
| 318 | #[test] |
| 319 | fn test_write_file_simple() { |
| 320 | let (dir, fs) = temp_fs(); |
| 321 | |
| 322 | { |
| 323 | let mut writer = fs.write_file("output.txt", Inode::new(1)).unwrap(); |
| 324 | writer.write_all(b"hello world").unwrap(); |
| 325 | } |
| 326 | |
| 327 | let contents = std::fs::read_to_string(dir.path().join("output.txt")).unwrap(); |
| 328 | assert_eq!(contents, "hello world"); |
| 329 | } |
| 330 | |
| 331 | #[test] |
| 332 | fn test_write_file_creates_parents() { |
nothing calls this directly
no test coverage detected