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

Function test_read_file_simple

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

Source from the content-addressed store, hash-verified

141
142#[test]
143fn test_read_file_simple() {
144 let (dir, fs) = temp_fs();
145 std::fs::write(dir.path().join("test.txt"), "hello world").unwrap();
146
147 let mut buffer = Vec::new();
148 fs.read_file("test.txt", &mut buffer).unwrap();
149 assert_eq!(buffer, b"hello world");
150}
151
152#[test]
153fn test_read_file_binary() {

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