commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r746940 - /commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
Date Mon, 23 Feb 2009 09:22:04 GMT
Author: bodewig
Date: Mon Feb 23 09:22:00 2009
New Revision: 746940

URL: http://svn.apache.org/viewvc?rev=746940&view=rev
Log:
re-enable tests disabled by accident.  7ZIP uses CP437 by default

Modified:
    commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java

Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java?rev=746940&r1=746939&r2=746940&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
(original)
+++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
Mon Feb 23 09:22:00 2009
@@ -43,29 +43,33 @@
         testFileRoundtrip(UTF_8, true);
     }
 
-    public void xtestUtf8FileRoundtripNoEFS() throws IOException {
+    public void testUtf8FileRoundtripNoEFS() throws IOException {
         testFileRoundtrip(UTF_8, false);
     }
 
-    public void xtestCP437FileRoundtrip() throws IOException {
+    public void testCP437FileRoundtrip() throws IOException {
         testFileRoundtrip(CP437, false);
     }
 
-    public void xtestASCIIFileRoundtrip() throws IOException {
+    public void testASCIIFileRoundtrip() throws IOException {
         testFileRoundtrip(US_ASCII, false);
     }
 
-    /**
+    /*
      * 7-ZIP created archive, uses EFS to signal UTF-8 filenames.
+     *
+     * 7-ZIP doesn't use EFS for strings that can be encoded in CP437
+     * - which is true for OIL_BARREL_TXT.
      */
-    public void testReadEFS() throws IOException, URISyntaxException {
+    public void testRead7ZipArchive() throws IOException, URISyntaxException {
         URL zip = getClass().getResource("/utf8-7zip-test.zip");
         File archive = new File(new URI(zip.toString()));
         ZipFile zf = null;
         try {
-            zf = new ZipFile(archive);
+            zf = new ZipFile(archive, CP437);
             assertNotNull(zf.getEntry(ASCII_TXT));
             assertNotNull(zf.getEntry(EURO_FOR_DOLLAR_TXT));
+            assertNotNull(zf.getEntry(OIL_BARREL_TXT));
         } finally {
             ZipFile.closeQuietly(zf);
         }



Mime
View raw message