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

Function test_roundtrip_write_read

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

Source from the content-addressed store, hash-verified

714
715#[test]
716fn test_roundtrip_write_read() {
717 let (_dir, fs) = temp_fs();
718 let content = b"This is test content with unicode: \xc3\xa9\xc3\xa8\xc3\xa0";
719
720 // Write
721 {
722 let mut writer = fs.write_file("test.txt", Inode::new(1)).unwrap();
723 writer.write_all(content).unwrap();
724 }
725
726 // Read
727 let mut buffer = Vec::new();
728 fs.read_file("test.txt", &mut buffer).unwrap();
729 assert_eq!(buffer, content);
730}
731
732#[test]
733fn test_full_workflow() {

Callers

nothing calls this directly

Calls 4

temp_fsFunction · 0.85
unwrapMethod · 0.45
write_fileMethod · 0.45
read_fileMethod · 0.45

Tested by

no test coverage detected