summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorPhilipp Thun <philipp.thun@sap.com>2011-03-18 13:33:36 +0100
committerPhilipp Thun <philipp.thun@sap.com>2011-03-18 13:33:36 +0100
commitfdb0a34abfd8b105a08887821d857fcdda2e22c4 (patch)
treed3053ee9e48ceaf5d8310b66d0e676b43f165e9a /org.eclipse.jgit.test
parentc0112f97a1509d9b87da46f7a2a28206e26c616c (diff)
downloadjgit-fdb0a34abfd8b105a08887821d857fcdda2e22c4.tar.gz
jgit-fdb0a34abfd8b105a08887821d857fcdda2e22c4.zip
Refactor ResolveMerger
1. Perform an explicit check for untracked files. 2. Extract 'dirty checks' into separate methods 3. Clean up comments. 4. Tests: also check contents of files not affected by merge. Change-Id: Ieb089668834d0a395c9ab192c555538917dfdc47 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
index 0ef24bd8a5..987e64731e 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
@@ -411,6 +411,7 @@ public class MergeCommandTest extends RepositoryTestCase {
assertEquals("1\nb(side)\n3\n", read(new File(db.getWorkTree(), "b")));
assertEquals("1\nc(main)\n3\n", read(new File(db.getWorkTree(),
"c/c/c")));
+ assertEquals("--- dirty ---", read(new File(db.getWorkTree(), "d")));
assertEquals(null, result.getConflicts());
@@ -468,6 +469,7 @@ public class MergeCommandTest extends RepositoryTestCase {
assertFalse(new File(db.getWorkTree(), "b").exists());
assertEquals("1\nc(main)\n3\n",
read(new File(db.getWorkTree(), "c/c/c")));
+ assertEquals("1\nd\n3\n", read(new File(db.getWorkTree(), "d")));
// Do the opposite, be on a branch where we have deleted a file and
// merge in a old commit where this file was not deleted
@@ -482,6 +484,7 @@ public class MergeCommandTest extends RepositoryTestCase {
assertFalse(new File(db.getWorkTree(), "b").exists());
assertEquals("1\nc(main)\n3\n",
read(new File(db.getWorkTree(), "c/c/c")));
+ assertEquals("1\nd\n3\n", read(new File(db.getWorkTree(), "d")));
}
@Test
@@ -554,6 +557,7 @@ public class MergeCommandTest extends RepositoryTestCase {
assertFalse(new File(db.getWorkTree(), "b").exists());
assertEquals("1\nc(main)\n3\n",
read(new File(db.getWorkTree(), "c/c/c")));
+ assertEquals("1\nd\n3\n", read(new File(db.getWorkTree(), "d")));
}
@Test