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

Function test_very_long_line

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

Source from the content-addressed store, hash-verified

558
559 #[test]
560 fn test_very_long_line() {
561 let mut content = vec![b'x'; 10000];
562 content.push(b'\n');
563 content.extend_from_slice(&[b'y'; 100]);
564 content.push(b'\n');
565
566 let lines: Vec<_> = LineSplit::new(&content, &Separator::Newline).collect();
567
568 assert_eq!(lines.len(), 2);
569 assert_eq!(lines[0].len(), 10001);
570 assert_eq!(lines[1].len(), 101);
571 }
572}

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected