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

Function test_write_with_newlines

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

Source from the content-addressed store, hash-verified

533
534 #[test]
535 fn test_write_with_newlines() {
536 with_writer(|writer| {
537 writer.write_all(b"Line 1\nLine 2\nLine 3\n").unwrap();
538 assert_eq!(writer.current_line(), 4); // Started at 1, added 3 newlines
539 assert_eq!(writer.bytes_written(), 21);
540 });
541 }
542
543 #[test]
544 fn test_write_tracks_line_start() {

Callers

nothing calls this directly

Calls 2

with_writerFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected