Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 45757 invoked from network); 17 Mar 2009 19:57:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2009 19:57:22 -0000 Received: (qmail 15807 invoked by uid 500); 17 Mar 2009 19:57:21 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 15749 invoked by uid 500); 17 Mar 2009 19:57:21 -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 15740 invoked by uid 99); 17 Mar 2009 19:57:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 12:57:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Tue, 17 Mar 2009 19:57:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2A56023888E7; Tue, 17 Mar 2009 19:56:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r755371 - /commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java Date: Tue, 17 Mar 2009 19:56:58 -0000 To: commits@commons.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090317195658.2A56023888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Tue Mar 17 19:56:57 2009 New Revision: 755371 URL: http://svn.apache.org/viewvc?rev=755371&view=rev Log: Make tests pass on Linux - this is only hiding a different issue that I'll open a JIRA ticket for tomorrow, directories have a size different from 0 when queried via File.length() on Unix-like systems Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java?rev=755371&r1=755370&r2=755371&view=diff ============================================================================== --- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java (original) +++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveEntryTest.java Tue Mar 17 19:56:57 2009 @@ -50,6 +50,7 @@ try { tout = new TarArchiveOutputStream(new FileOutputStream(f)); TarArchiveEntry t = new TarArchiveEntry(new File(ROOT)); + t.setSize(0); tout.putNextEntry(t); tout.closeEntry(); t = new TarArchiveEntry(new File(new File(ROOT), "foo.txt")); @@ -73,13 +74,18 @@ tout = null; tin = new TarArchiveInputStream(new FileInputStream(f)); + //tin.setDebug(true); t = tin.getNextTarEntry(); + assertNotNull(t); assertEquals("/", t.getName()); t = tin.getNextTarEntry(); + assertNotNull(t); assertEquals("foo.txt", t.getName()); t = tin.getNextTarEntry(); + assertNotNull(t); assertEquals("bar.txt", t.getName()); t = tin.getNextTarEntry(); + assertNotNull(t); assertEquals("baz.txt", t.getName()); } finally { if (tin != null) {