MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_read_file_nested

Function test_read_file_nested

atomic-core/src/output/filesystem/tests.rs:174–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172
173#[test]
174fn 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]
185fn test_read_file_not_found() {

Callers

nothing calls this directly

Calls 5

temp_fsFunction · 0.85
writeFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45
read_fileMethod · 0.45

Tested by

no test coverage detected