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

Function test_output_line_basic

atomic-core/src/output/repo/writer.rs:690–707  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688
689 #[test]
690 fn test_output_line_basic() {
691 let node = GraphNode::new(
692 NodeId::new(1),
693 ChangePosition::new(0),
694 ChangePosition::new(5),
695 );
696
697 let buffer = with_writer(|writer| {
698 let result: Result<(), std::io::Error> = writer.output_line(node, |buf| {
699 buf.copy_from_slice(b"hello");
700 Ok(())
701 });
702
703 assert!(result.is_ok());
704 assert_eq!(writer.bytes_written(), 5);
705 });
706 assert_eq!(buffer, b"hello");
707 }
708
709 #[test]
710 fn test_output_line_with_newline() {

Callers

nothing calls this directly

Calls 2

with_writerFunction · 0.85
output_lineMethod · 0.45

Tested by

no test coverage detected