aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java
index 999bf434ce..d533829d52 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java
@@ -96,6 +96,20 @@ public class CheckoutTest extends CLIRepositoryTestCase {
}
@Test
+ public void testCheckoutWithNoRef() throws Exception {
+ assertStringArrayEquals(
+ "a valid ref is expected",
+ executeExpectingException("git checkout"));
+ }
+
+ @Test
+ public void testCheckoutWithInvalidRef() throws Exception {
+ assertStringArrayEquals(
+ ".feature is not a valid ref name",
+ executeExpectingException("git checkout .feature"));
+ }
+
+ @Test
public void testCheckoutNewBranchThatAlreadyExists() throws Exception {
try (Git git = new Git(db)) {
git.commit().setMessage("initial commit").call();