()
| 295 | |
| 296 | #[test] |
| 297 | fn test_write_file_simple() { |
| 298 | let (dir, fs) = temp_fs(); |
| 299 | |
| 300 | { |
| 301 | let mut writer = fs.write_file("output.txt", Inode::new(1)).unwrap(); |
| 302 | writer.write_all(b"hello world").unwrap(); |
| 303 | } |
| 304 | |
| 305 | let contents = std::fs::read_to_string(dir.path().join("output.txt")).unwrap(); |
| 306 | assert_eq!(contents, "hello world"); |
| 307 | } |
| 308 | |
| 309 | #[test] |
| 310 | fn test_write_file_creates_parents() { |
nothing calls this directly
no test coverage detected