From 81eccf4d2e6cb70a120d2451e8e1fc5a883b37a0 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 20 Oct 2016 20:31:57 +0000 Subject: [PATCH] Exclude new BIFF5 file in some unit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765876 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/TestAllFiles.java | 1 + .../org/apache/poi/hssf/dev/TestReSave.java | 18 ++++++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/integrationtest/org/apache/poi/TestAllFiles.java b/src/integrationtest/org/apache/poi/TestAllFiles.java index 5b50be1e8c..32e20f4ba6 100644 --- a/src/integrationtest/org/apache/poi/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/TestAllFiles.java @@ -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 EXPECTED_FAILURES = new HashSet(); diff --git a/src/testcases/org/apache/poi/hssf/dev/TestReSave.java b/src/testcases/org/apache/poi/hssf/dev/TestReSave.java index 960fd132f0..80925bae13 100644 --- a/src/testcases/org/apache/poi/hssf/dev/TestReSave.java +++ b/src/testcases/org/apache/poi/hssf/dev/TestReSave.java @@ -16,13 +16,6 @@ ==================================================================== */ 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 failed = new ArrayList(); runOneFile(new File(dataDirName + "/spreadsheet", "49931.xls")); - - assertTrue("Expected to have no failed except the ones excluded, but had: " + failed, - failed.isEmpty()); } } -- 2.39.5