Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 5594 invoked from network); 23 Mar 2011 13:41:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2011 13:41:51 -0000 Received: (qmail 12176 invoked by uid 500); 23 Mar 2011 13:41:50 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 12118 invoked by uid 500); 23 Mar 2011 13:41:50 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 12111 invoked by uid 99); 23 Mar 2011 13:41:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 13:41:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 13:41:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B6D22238890D; Wed, 23 Mar 2011 13:41:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1084587 - in /commons/proper/compress/trunk/src/test: java/org/apache/commons/compress/DetectArchiverTestCase.java resources/COMPRESS-117.tar Date: Wed, 23 Mar 2011 13:41:26 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110323134126.B6D22238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Wed Mar 23 13:41:26 2011 New Revision: 1084587 URL: http://svn.apache.org/viewvc?rev=1084587&view=rev Log: COMPRESS-117 Add some test cases COMPRESS-117.tar created from bla.tar with the first lot of magic bytes nulled out Added: commons/proper/compress/trunk/src/test/resources/COMPRESS-117.tar (with props) Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java?rev=1084587&r1=1084586&r2=1084587&view=diff ============================================================================== --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java (original) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/DetectArchiverTestCase.java Wed Mar 23 13:41:26 2011 @@ -38,6 +38,21 @@ public final class DetectArchiverTestCas final ClassLoader classLoader = getClass().getClassLoader(); + public void testDetectionNotArchive() throws FileNotFoundException { + try { + getStreamFor("test.txt"); + fail("Expected ArchiveException"); + } catch (ArchiveException e) { + // expected + } + } + + public void testCOMPRESS117() throws Exception { + final ArchiveInputStream tar = getStreamFor("COMPRESS-117.tar"); + assertNotNull(tar); + assertTrue(tar instanceof TarArchiveInputStream); + } + public void testDetection() throws Exception { final ArchiveInputStream ar = getStreamFor("bla.ar"); Added: commons/proper/compress/trunk/src/test/resources/COMPRESS-117.tar URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/resources/COMPRESS-117.tar?rev=1084587&view=auto ============================================================================== Binary file - no diff available. Propchange: commons/proper/compress/trunk/src/test/resources/COMPRESS-117.tar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream