diff options
author | Ivan Frade <ifrade@google.com> | 2024-04-09 18:01:37 +0000 |
---|---|---|
committer | Gerrit Code Review <support@gerrithub.io> | 2024-04-09 18:01:37 +0000 |
commit | 8404bf19a4a6e343ef2a879bf8a9fdd7049312fa (patch) | |
tree | d45961f82ee0f84e73b048060a436fa4e8437da3 /org.eclipse.jgit.test | |
parent | 5c623b1e6c69f2f67076d668157f9ad6be54422d (diff) | |
parent | e4b4f063b335fb6042efbeabff92088d7d1e3f20 (diff) | |
download | jgit-8404bf19a4a6e343ef2a879bf8a9fdd7049312fa.tar.gz jgit-8404bf19a4a6e343ef2a879bf8a9fdd7049312fa.zip |
Merge "MergeAlgorithm: Fix diff3 conflict hunk computation"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java index 680a2d5d72..7a8a93e977 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java @@ -162,6 +162,19 @@ public class MergeAlgorithmTest { merge("abz}z}z123q", "Abz}z123Q", "abz}z123q", true)); } + @Test + public void testInsertionAfterDeletion() throws IOException { + assertEquals(t("a<=bc>d"), merge("abd", "ad", "abcd", false)); + assertEquals(t("a<|b=bc>d"), + merge("abd", "ad", "abcd", true)); + } + + @Test + public void testInsertionBeforeDeletion() throws IOException { + assertEquals(t("a<=cb>d"), merge("abd", "ad", "acbd", false)); + assertEquals(t("a<|b=cb>d"), merge("abd", "ad", "acbd", true)); + } + /** * Test a conflicting region at the very start of the text. * |