summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2014-08-03 18:32:43 +1000
committerRobin Stocker <robin@nibor.org>2014-08-03 18:38:38 +1000
commitf5494c186f4fb54d13527944bd1b59ff8c291364 (patch)
tree307c9f3a17bb383dafa84bbbdaac70707bdd23d2 /org.eclipse.jgit.test
parent93530625cf26e9a06f976e1575269becdcbee283 (diff)
downloadjgit-f5494c186f4fb54d13527944bd1b59ff8c291364.tar.gz
jgit-f5494c186f4fb54d13527944bd1b59ff8c291364.zip
Add isRebase to API of BranchConfig
Change-Id: I9819f49410e30d32c2157db0556a0dd6a0bcc5a4 Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java
index 63441bfe90..87bb082485 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java
@@ -45,7 +45,9 @@
package org.eclipse.jgit.lib;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.junit.Test;
@@ -144,6 +146,20 @@ public class BranchConfigTest {
branchConfig.getTrackingBranch());
}
+ @Test
+ public void isRebase() {
+ Config c = parse("" //
+ + "[branch \"undefined\"]\n"
+ + "[branch \"false\"]\n"
+ + " rebase = false\n"
+ + "[branch \"true\"]\n"
+ + " rebase = true\n");
+
+ assertFalse(new BranchConfig(c, "undefined").isRebase());
+ assertFalse(new BranchConfig(c, "false").isRebase());
+ assertTrue(new BranchConfig(c, "true").isRebase());
+ }
+
private static Config parse(final String content) {
final Config c = new Config(null);
try {