Update tests and changelog for 1e8be4558b

empty_delimiters_heuristic
Wilfred Hughes 2024-07-21 11:15:54 +07:00
parent 92fa3fb3de
commit c2f4b1f2ee
2 changed files with 12 additions and 8 deletions

@ -5,6 +5,9 @@
Fixed an issue where files with no common content would show duplicate
hunks.
Fixed a performance issue when files had extremely long lines
(e.g. 100,000+ characters).
## 0.59 (released 20th July 2024)
### Diffing

@ -278,8 +278,9 @@ mod tests {
// Even though the word exists on both sides, it should still
// be treated as a change. We're doing a line-based diff and
// the lines are different.
let positions = change_positions("foo", " foo");
assert!(positions[0].kind.is_novel());
let mut positions = change_positions("foo", " foo");
let last_pos = positions.pop().unwrap();
assert!(last_pos.kind.is_novel());
}
#[test]
@ -300,17 +301,17 @@ mod tests {
#[test]
fn test_novel_lhs_trailing_newlines() {
let positions = change_positions("foo\n", "");
let mut positions = change_positions("foo\n", "");
assert_eq!(positions.len(), 2);
assert!(positions[0].kind.is_novel());
let last_pos = positions.pop().unwrap();
assert!(last_pos.kind.is_novel());
}
#[test]
fn test_positions_novel_lhs() {
let positions = change_positions("foo", "");
let mut positions = change_positions("foo", "");
assert_eq!(positions.len(), 1);
assert!(positions[0].kind.is_novel());
let last_pos = positions.pop().unwrap();
assert!(last_pos.kind.is_novel());
}
}