From d4932620e067a19a8cc22170fd133cc53aca2ddb Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 23 May 2013 18:08:35 -0700 Subject: ArchiveCommand: make archive formats non-inner classes First step toward making ArchiveCommand itself format-agnostic. Change-Id: I3cff5fce28fa7a19e34f8291cfb5b62f16429713 --- .../tst/org/eclipse/jgit/pgm/ArchiveTest.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'org.eclipse.jgit.pgm.test/tst/org/eclipse') 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 @@ -102,6 +102,13 @@ public class ArchiveTest extends CLIRepositoryTestCase { assertArrayEquals(new String[0], listTarEntries(result)); } + @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!"); -- cgit v1.2.3