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

Function test_linesplit_custom_separator

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected