commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1427340 - in /commons/proper/compress/trunk/src/test: java/org/apache/commons/compress/archivers/zip/ZipFileTest.java resources/COMPRESS-208.zip
Date Tue, 01 Jan 2013 10:26:01 GMT
Author: bodewig
Date: Tue Jan  1 10:26:01 2013
New Revision: 1427340

URL: http://svn.apache.org/viewvc?rev=1427340&view=rev
Log:
COMPRESS-208: ZipFile deals well with PK00 prefix

Added:
    commons/proper/compress/trunk/src/test/resources/COMPRESS-208.zip   (with props)
Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java?rev=1427340&r1=1427339&r2=1427340&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
Tue Jan  1 10:26:01 2013
@@ -152,6 +152,19 @@ public class ZipFileTest extends TestCas
         assertNotNull(zf.getEntry("\u00e4/\u00fc.txt"));
     }
 
+    /**
+     * Test case for 
+     * <a href="https://issues.apache.org/jira/browse/COMPRESS-208"
+     * >COMPRESS-208</a>.
+     */
+    public void testSkipsPK00Prefix() throws Exception {
+        URL zip = getClass().getResource("/COMPRESS-208.zip");
+        File archive = new File(new URI(zip.toString()));
+        zf = new ZipFile(archive);
+        assertNotNull(zf.getEntry("test1.xml"));
+        assertNotNull(zf.getEntry("test2.xml"));
+    }
+
     /*
      * ordertest.zip has been handcrafted.
      *

Added: commons/proper/compress/trunk/src/test/resources/COMPRESS-208.zip
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/resources/COMPRESS-208.zip?rev=1427340&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/proper/compress/trunk/src/test/resources/COMPRESS-208.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message