()
| 172 | |
| 173 | #[test] |
| 174 | fn test_read_file_nested() { |
| 175 | let (dir, fs) = temp_fs(); |
| 176 | std::fs::create_dir_all(dir.path().join("a/b/c")).unwrap(); |
| 177 | std::fs::write(dir.path().join("a/b/c/deep.txt"), "deep content").unwrap(); |
| 178 | |
| 179 | let mut buffer = Vec::new(); |
| 180 | fs.read_file("a/b/c/deep.txt", &mut buffer).unwrap(); |
| 181 | assert_eq!(buffer, b"deep content"); |
| 182 | } |
| 183 | |
| 184 | #[test] |
| 185 | fn test_read_file_not_found() { |