()
| 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() { |