diff options
-rw-r--r-- | src/edits.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/edits.rs b/src/edits.rs index 072e4eca..63869b41 100644 --- a/src/edits.rs +++ b/src/edits.rs @@ -461,6 +461,28 @@ mod tests { ) } + #[test] + fn test_infer_edits_9() { + assert_edits( + vec!["a a"], + vec!["a b a"], + ( + vec![vec![(MinusNoop, "a"), (MinusNoop, " a")]], + vec![vec![(PlusNoop, "a"), (Insertion, " b"), (PlusNoop, " a")]], + ), + 1.0, + ); + assert_edits( + vec!["a a"], + vec!["a b b a"], + ( + vec![vec![(MinusNoop, "a"), (MinusNoop, " a")]], + vec![vec![(PlusNoop, "a"), (Insertion, " b b"), (PlusNoop, " a")]], + ), + 1.0, + ); + } + fn assert_edits( minus_lines: Vec<&str>, plus_lines: Vec<&str>, |