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

Function test_linesplit_simple

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

Source from the content-addressed store, hash-verified

368 // LineSplit Tests
369 #[test]
370 fn test_linesplit_simple() {
371 let content = b"a\nb\nc\n";
372 let lines: Vec<_> = LineSplit::new(content, &Separator::Newline).collect();
373
374 assert_eq!(lines.len(), 3);
375 assert_eq!(lines[0].content(), b"a\n");
376 assert_eq!(lines[1].content(), b"b\n");
377 assert_eq!(lines[2].content(), b"c\n");
378 }
379
380 #[test]
381 fn test_linesplit_no_trailing_newline() {

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected