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

Function test_mixed_line_endings

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

Source from the content-addressed store, hash-verified

536 // Edge Cases
537 #[test]
538 fn test_mixed_line_endings() {
539 // When using newline separator, \r\n appears as \r at end of line
540 let content = b"unix\nwindows\r\nmac\r";
541 let lines: Vec<_> = LineSplit::new(content, &Separator::Newline).collect();
542
543 assert_eq!(lines.len(), 3);
544 assert_eq!(lines[0].content(), b"unix\n");
545 assert_eq!(lines[1].content(), b"windows\r\n");
546 assert_eq!(lines[2].content(), b"mac\r");
547 }
548
549 #[test]
550 fn test_binary_content() {

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected