From 61c1b9f4eb35547b573314f4e722267a4dde5479 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 23 May 2023 21:21:28 -0700 Subject: [PATCH] files: add another test of a 5-way merge Just to show that this case doesn't change in the next commit. --- lib/src/files.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/files.rs b/lib/src/files.rs index 7f7fcffcf..0175109ed 100644 --- a/lib/src/files.rs +++ b/lib/src/files.rs @@ -430,5 +430,13 @@ mod tests { adds: vec![b"c".to_vec(), b"d".to_vec(), b"e".to_vec()] })]) ); + // Two sides made the same change, third side made a different change + assert_eq!( + merge(&[b"a", b"b"], &[b"c", b"c", b"c"]), + MergeResult::Conflict(vec![MergeHunk::Conflict(ConflictHunk { + removes: vec![b"a".to_vec(), b"b".to_vec()], + adds: vec![b"c".to_vec(), b"c".to_vec(), b"c".to_vec()] + })]) + ); } }