()
| 329 | |
| 330 | #[test] |
| 331 | fn test_completely_different() { |
| 332 | let old = lines(&["a\n", "b\n", "c\n"]); |
| 333 | let new = lines(&["x\n", "y\n", "z\n"]); |
| 334 | |
| 335 | let result = diff(&old, &new); |
| 336 | |
| 337 | // All replaced |
| 338 | assert_eq!(result.deletions(), 3); |
| 339 | assert_eq!(result.insertions(), 3); |
| 340 | } |
| 341 | |
| 342 | #[test] |
| 343 | fn test_operations_have_correct_positions() { |