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

Function test_write_tracks_line_start

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

Source from the content-addressed store, hash-verified

542
543 #[test]
544 fn test_write_tracks_line_start() {
545 with_writer(|writer| {
546 // Initially at line start
547 assert!(writer.at_line_start);
548
549 // After partial line, not at start
550 writer.write_all(b"partial").unwrap();
551 assert!(!writer.at_line_start);
552
553 // After newline, at start again
554 writer.write_all(b"\n").unwrap();
555 assert!(writer.at_line_start);
556 });
557 }
558
559 // ------------------------------------------------------------------------
560 // Conflict Marker Tests

Callers

nothing calls this directly

Calls 2

with_writerFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected