summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst/org/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst/org/eclipse')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java
index 74506bc944..f1a53d7dcc 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java
@@ -53,6 +53,7 @@ import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.pgm.internal.CLIText;
import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Before;
import org.junit.Test;
@@ -66,6 +67,15 @@ public class BranchTest extends CLIRepositoryTestCase {
}
@Test
+ public void testHelpAfterDelete() throws Exception {
+ String err = toString(executeUnchecked("git branch -d"));
+ String help = toString(executeUnchecked("git branch -h"));
+ String errAndHelp = toString(executeUnchecked("git branch -d -h"));
+ assertEquals(CLIText.fatalError(CLIText.get().branchNameRequired), err);
+ assertEquals(toString(err, help), errAndHelp);
+ }
+
+ @Test
public void testList() throws Exception {
assertEquals("* master", toString(execute("git branch")));
assertEquals("* master 6fd41be initial commit",