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

Function test_read_file_empty

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

Source from the content-addressed store, hash-verified

201
202#[test]
203fn test_read_file_empty() {
204 let (dir, fs) = temp_fs();
205 std::fs::write(dir.path().join("empty.txt"), "").unwrap();
206
207 let mut buffer = Vec::new();
208 fs.read_file("empty.txt", &mut buffer).unwrap();
209 assert!(buffer.is_empty());
210}
211
212// ------------------------------------------------------------------------
213// File Metadata

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