()
| 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() { |
nothing calls this directly
no test coverage detected