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