commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r761091 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java
Date Wed, 01 Apr 2009 22:21:40 GMT
Author: sebb
Date: Wed Apr  1 22:21:40 2009
New Revision: 761091

URL: http://svn.apache.org/viewvc?rev=761091&view=rev
Log:
Compare filesize as well as filename

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java?rev=761091&r1=761090&r2=761091&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/ArchiveReadTests.java
Wed Apr  1 22:21:40 2009
@@ -27,7 +27,9 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.apache.commons.compress.archivers.ArchiveEntry;
 import org.apache.commons.compress.archivers.ArchiveException;
+import org.apache.commons.compress.utils.ArchiveEntryUtils;
 
 /**
  * Test that can read various archive file examples.
@@ -68,8 +70,7 @@
             if (line.startsWith("#")){
                 continue;
             }
-            String []fields = line.split(" ");
-            fileList.add(fields[1]);
+            fileList.add(line);
         }
         br.close();
         File[]files=arcdir.listFiles();
@@ -93,6 +94,11 @@
         return suite;
     }
     
+    // files.txt contains size and filename
+    protected String getExpectedString(ArchiveEntry entry) {
+        return entry.getSize() + " " + entry.getName();
+    }
+
     public void testArchive() throws Exception{
         ArrayList expected=(ArrayList) fileList.clone();
         try {



Mime
View raw message