From e1d71c3713c8e998b7c245c1159f96a64bc93b28 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 17 Feb 2023 09:51:14 -0800 Subject: [PATCH] conflicts: add test for materializing modify/delete conflict --- lib/tests/test_conflicts.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/tests/test_conflicts.rs b/lib/tests/test_conflicts.rs index e91fc668d..aa7bdecef 100644 --- a/lib/tests/test_conflicts.rs +++ b/lib/tests/test_conflicts.rs @@ -191,6 +191,21 @@ line 5 line 5 "### ); + + // modify/delete conflict at the file level + let conflict = Conflict { + removes: vec![file_conflict_part(&base_id)], + adds: vec![file_conflict_part(&modified_id)], + }; + // TODO: THis should have context around the conflict (#1244) + insta::assert_snapshot!(&materialize_conflict_string(store, &path, &conflict), @r###" + <<<<<<< + %%%%%%% + -line 3 + +modified + >>>>>>> + "### + ); } #[test]