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

Function test_add_file

atomic-core/src/output/memory.rs:761–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

759
760 #[test]
761 fn test_add_file() {
762 let wc = Memory::new();
763 wc.add_file("test.txt", b"hello world");
764
765 let contents = wc.get_file_contents("test.txt").unwrap();
766 assert_eq!(contents, b"hello world");
767 }
768
769 #[test]
770 fn test_add_file_creates_parent_dirs() {

Callers

nothing calls this directly

Calls 3

get_file_contentsMethod · 0.80
add_fileMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected