()
| 440 | |
| 441 | #[test] |
| 442 | fn test_linesplit_custom_separator() { |
| 443 | let content = b"field1||field2||field3"; |
| 444 | let sep = Separator::Custom(b"||".to_vec()); |
| 445 | let lines: Vec<_> = LineSplit::new(content, &sep).collect(); |
| 446 | |
| 447 | assert_eq!(lines.len(), 3); |
| 448 | assert_eq!(lines[0].content(), b"field1||"); |
| 449 | assert_eq!(lines[1].content(), b"field2||"); |
| 450 | assert_eq!(lines[2].content(), b"field3"); |
| 451 | } |
| 452 | |
| 453 | #[test] |
| 454 | fn test_linesplit_byte_separator() { |