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

Function test_file_writer_finish

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

Source from the content-addressed store, hash-verified

363
364#[test]
365fn test_file_writer_finish() {
366 let (dir, fs) = temp_fs();
367
368 let mut writer = fs.write_file("test.txt", Inode::new(1)).unwrap();
369 writer.write_all(b"content").unwrap();
370 writer.finish().unwrap();
371
372 let contents = std::fs::read_to_string(dir.path().join("test.txt")).unwrap();
373 assert_eq!(contents, "content");
374}
375
376// ------------------------------------------------------------------------
377// Directory Operations

Callers

nothing calls this directly

Calls 5

temp_fsFunction · 0.85
unwrapMethod · 0.45
write_fileMethod · 0.45
finishMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected