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

Function test_replace

atomic-core/src/diff/myers.rs:263–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261
262 #[test]
263 fn test_replace() {
264 let old = lines(&["a\n", "b\n", "c\n"]);
265 let new = lines(&["a\n", "x\n", "c\n"]);
266
267 let result = diff(&old, &new);
268
269 // Should be detected as replace (delete b, insert x)
270 assert_eq!(result.deletions(), 1);
271 assert_eq!(result.insertions(), 1);
272 }
273
274 #[test]
275 fn test_multiple_changes() {

Callers

nothing calls this directly

Calls 2

linesFunction · 0.70
diffFunction · 0.70

Tested by

no test coverage detected