From aadf22c53fd5d9acc38b75afa8586eae099fb98a Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sun, 11 Aug 2019 18:37:24 -0700 Subject: Add failing test of edits inference --- src/edits.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/edits.rs') diff --git a/src/edits.rs b/src/edits.rs index 63869b41..2a62129a 100644 --- a/src/edits.rs +++ b/src/edits.rs @@ -483,6 +483,27 @@ mod tests { ); } + #[test] + fn test_infer_edits_10() { + assert_edits( + vec!["so it is safe to read the commit number from any one of them."], + vec!["so it is safe to read build info from any one of them."], + ( + vec![vec![ + (MinusNoop, "so it is safe to read"), + (Deletion, "the commit number"), + (MinusNoop, "from any one of them."), + ]], + vec![vec![ + (PlusNoop, "so it is safe to read"), + (Insertion, "build info"), + (PlusNoop, "from any one of them."), + ]], + ), + 1.0, + ); + } + fn assert_edits( minus_lines: Vec<&str>, plus_lines: Vec<&str>, -- cgit v1.2.3