From 72aa4af349afd42d3f4cbe6f10370404773a15f1 Mon Sep 17 00:00:00 2001 From: Kent Krantz Date: Fri, 27 Nov 2020 13:14:06 +0800 Subject: [PATCH] Fixed bug of smoke_merge_file --- src/repo.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/repo.rs b/src/repo.rs index 0cc5f32a7c..aa979674e1 100644 --- a/src/repo.rs +++ b/src/repo.rs @@ -3424,6 +3424,8 @@ mod tests { assert!(index.has_conflicts(), "index should have conflicts"); + let mut conflict_count = 0; + let index_conflicts = index.conflicts().unwrap(); for conflict in index_conflicts { let conflict = conflict.unwrap(); @@ -3498,7 +3500,10 @@ mod tests { }, merge_file_result_content ); + + conflict_count += 1; } + assert_eq!(conflict_count, 1, "There should be one conflict!"); } /// create the following: