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

Function test_sink_discards_output

atomic-core/src/output/mod.rs:685–694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

683
684 #[test]
685 fn test_sink_discards_output() {
686 use std::io::Write;
687
688 let sink = Sink::new();
689 assert!(!sink.is_writable("/any/path").unwrap());
690
691 let mut writer = sink.write_file("/test", Inode::ROOT).unwrap();
692 writer.write_all(b"discarded").unwrap();
693 // No error, but nothing stored
694 }
695}

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
write_fileMethod · 0.45

Tested by

no test coverage detected