]> source.dussan.org Git - poi.git/commitdiff
Exclude new BIFF5 file in some unit tests
authorDominik Stadler <centic@apache.org>
Thu, 20 Oct 2016 20:31:57 +0000 (20:31 +0000)
committerDominik Stadler <centic@apache.org>
Thu, 20 Oct 2016 20:31:57 +0000 (20:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765876 13f79535-47bb-0310-9956-ffa450edef68

src/integrationtest/org/apache/poi/TestAllFiles.java
src/testcases/org/apache/poi/hssf/dev/TestReSave.java

index 5b50be1e8c9c023127fed22782856dc35e7e0977..32e20f4ba610f51ea8cf0b9b9e9c8abd8530d34c 100644 (file)
@@ -189,6 +189,7 @@ public class TestAllFiles {
         OLD_FILES.add("document/word95err.doc");
         OLD_FILES.add("hpsf/TestMickey.doc");
         OLD_FILES.add("document/52117.doc");
+        OLD_FILES.add("spreadsheet/60284.xls");
     }
 
     private static final Set<String> EXPECTED_FAILURES = new HashSet<String>();
index 960fd132f03328f0af348ad4b325b01646af40b9..80925bae134611286ad0427983e6eef5bc2c6e7b 100644 (file)
 ==================================================================== */
 package org.apache.poi.hssf.dev;
 
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.poi.EncryptedDocumentException;
 import org.apache.poi.POIDataSamples;
 import org.apache.poi.hssf.OldExcelFormatException;
@@ -32,6 +25,11 @@ import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.PrintStream;
+
+import static org.junit.Assert.assertTrue;
+
 public class TestReSave extends BaseXLSIteratingTest {
     @BeforeClass
     public static void setup() {
@@ -76,7 +74,7 @@ public class TestReSave extends BaseXLSIteratingTest {
                        ReSave.main(new String[] { "-bos", reSavedFile.getAbsolutePath() });
                        } finally {
                                // clean up the re-saved file
-                               reSavedFile.delete();
+                               assertTrue(!reSavedFile.exists() || reSavedFile.delete());
                        }
 
                } finally {
@@ -92,10 +90,6 @@ public class TestReSave extends BaseXLSIteratingTest {
             dataDirName = "test-data";
         }
 
-        List<String> failed = new ArrayList<String>();
         runOneFile(new File(dataDirName + "/spreadsheet", "49931.xls"));
-
-        assertTrue("Expected to have no failed except the ones excluded, but had: " + failed, 
-                failed.isEmpty());
     }
 }