commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1404697 - in /commons/proper/compress/trunk/src/test: java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java resources/testCompress209.doc
Date Thu, 01 Nov 2012 18:05:03 GMT
Author: sebb
Date: Thu Nov  1 18:05:03 2012
New Revision: 1404697

URL: http://svn.apache.org/viewvc?rev=1404697&view=rev
Log:
COMPRESS-209 Add test.doc to show problem has been fixed

Added:
    commons/proper/compress/trunk/src/test/resources/testCompress209.doc   (with props)
Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java?rev=1404697&r1=1404696&r2=1404697&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ArchiveStreamFactoryTest.java
Thu Nov  1 18:05:03 2012
@@ -63,4 +63,20 @@ public class ArchiveStreamFactoryTest {
         }
     }
 
+    @Test
+    public void testCOMPRESS209() throws Exception {
+        InputStream is = null;
+        try {
+            is = new BufferedInputStream(new FileInputStream("src/test/resources/testCompress209.doc"));
+            new ArchiveStreamFactory().createArchiveInputStream(is);
+            fail("created an input stream for a non-archive");
+        } catch (ArchiveException ae) {
+            assertTrue(ae.getMessage().startsWith("No Archiver found"));
+        } finally {
+            if (is != null) {
+                is.close();
+            }
+        }
+    }
+
 }

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

Propchange: commons/proper/compress/trunk/src/test/resources/testCompress209.doc
------------------------------------------------------------------------------
    svn:mime-type = application/msword



Mime
View raw message