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

Function test_linesplit_no_trailing_newline

atomic-core/src/diff/split.rs:381–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379
380 #[test]
381 fn test_linesplit_no_trailing_newline() {
382 let content = b"a\nb\nc";
383 let lines: Vec<_> = LineSplit::new(content, &Separator::Newline).collect();
384
385 assert_eq!(lines.len(), 3);
386 assert_eq!(lines[0].content(), b"a\n");
387 assert_eq!(lines[1].content(), b"b\n");
388 assert_eq!(lines[2].content(), b"c");
389 assert!(lines[2].is_last());
390 }
391
392 #[test]
393 fn test_linesplit_empty() {

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected