aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst/org
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2013-05-23 18:08:35 -0700
committerJonathan Nieder <jrn@google.com>2013-05-23 18:08:35 -0700
commitd4932620e067a19a8cc22170fd133cc53aca2ddb (patch)
treeef54dafb37197c2b8c1c5f2d61448b44a6d09d1c /org.eclipse.jgit.pgm.test/tst/org
parentf7157a622179b195d9f2747fe13c341d57590d3b (diff)
downloadjgit-d4932620e067a19a8cc22170fd133cc53aca2ddb.tar.gz
jgit-d4932620e067a19a8cc22170fd133cc53aca2ddb.zip
ArchiveCommand: make archive formats non-inner classes
First step toward making ArchiveCommand itself format-agnostic. Change-Id: I3cff5fce28fa7a19e34f8291cfb5b62f16429713
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst/org')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
index bcf2728524..cb2a7258a6 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
@@ -103,6 +103,13 @@ public class ArchiveTest extends CLIRepositoryTestCase {
}
@Test
+ public void testUnrecognizedFormat() throws Exception {
+ final String[] expect = new String[] { "fatal: Unknown archive format 'nonsense'" };
+ final String[] actual = execute("git archive --format=nonsense " + emptyTree);
+ assertArrayEquals(expect, actual);
+ }
+
+ @Test
public void testArchiveWithFiles() throws Exception {
writeTrashFile("a", "a file with content!");
writeTrashFile("c", ""); // empty file