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

Function test_replace

atomic-core/src/diff/patience.rs:446–455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444
445 #[test]
446 fn test_replace() {
447 let old = lines(&["a\n", "b\n", "c\n"]);
448 let new = lines(&["a\n", "x\n", "c\n"]);
449
450 let result = diff(&old, &new);
451
452 // a and c are unique anchors, so b→x is a change between them
453 assert_eq!(result.deletions(), 1);
454 assert_eq!(result.insertions(), 1);
455 }
456
457 // Unique Match Tests
458 #[test]

Callers

nothing calls this directly

Calls 2

linesFunction · 0.70
diffFunction · 0.70

Tested by

no test coverage detected