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:694–708  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

692
693#[test]
694fn test_roundtrip_write_read() {
695 let (_dir, fs) = temp_fs();
696 let content = b"This is test content with unicode: \xc3\xa9\xc3\xa8\xc3\xa0";
697
698 // Write
699 {
700 let mut writer = fs.write_file("test.txt", Inode::new(1)).unwrap();
701 writer.write_all(content).unwrap();
702 }
703
704 // Read
705 let mut buffer = Vec::new();
706 fs.read_file("test.txt", &mut buffer).unwrap();
707 assert_eq!(buffer, content);
708}
709
710#[test]
711fn 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