aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-08-18 13:50:31 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-08-18 13:50:31 +0000
commita73348fe8bac35ead3d72c76179d3bcacbd2a01a (patch)
tree1c6bc7560c7af81c2326b6d08cdda7335c4c0630 /src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java
parentf51306457dddc8a0ba9503294d991facebbd642b (diff)
downloadpoi-a73348fe8bac35ead3d72c76179d3bcacbd2a01a.tar.gz
poi-a73348fe8bac35ead3d72c76179d3bcacbd2a01a.zip
Update library versions
Replace deprecated junit @Rules with assertThrows Adapt to XMLSec refactoring in version 2.2.0 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java')
-rw-r--r--src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java b/src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java
index 75adb444a4..f5cce1b268 100644
--- a/src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java
+++ b/src/testcases/org/apache/poi/hssf/dev/TestBiffViewer.java
@@ -22,26 +22,21 @@ import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
-import org.apache.poi.EncryptedDocumentException;
-import org.apache.poi.POIDataSamples;
import org.apache.poi.hssf.OldExcelFormatException;
-import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.NullOutputStream;
import org.apache.poi.util.RecordFormatException;
import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
public class TestBiffViewer extends BaseTestIteratingXLS {
@BeforeClass
public static void setup() {
EXCLUDED.clear();
- EXCLUDED.put("35897-type4.xls", EncryptedDocumentException.class); // unsupported crypto api header
- EXCLUDED.put("51832.xls", EncryptedDocumentException.class);
- EXCLUDED.put("xor-encryption-abc.xls", EncryptedDocumentException.class);
- EXCLUDED.put("password.xls", EncryptedDocumentException.class);
+ EXCLUDED.put("35897-type4.xls", IllegalArgumentException.class); // unsupported crypto api header
+ EXCLUDED.put("51832.xls", IllegalArgumentException.class);
+ EXCLUDED.put("xor-encryption-abc.xls", RecordFormatException.class);
+ EXCLUDED.put("password.xls", IllegalArgumentException.class);
EXCLUDED.put("46904.xls", OldExcelFormatException.class);
EXCLUDED.put("59074.xls", OldExcelFormatException.class);
EXCLUDED.put("testEXCEL_2.xls", OldExcelFormatException.class); // Biff 2 / Excel 2, pre-OLE2
@@ -50,11 +45,11 @@ public class TestBiffViewer extends BaseTestIteratingXLS {
EXCLUDED.put("testEXCEL_5.xls", OldExcelFormatException.class); // Biff 5 / Excel 5
EXCLUDED.put("60284.xls", OldExcelFormatException.class); // Biff 5 / Excel 5
EXCLUDED.put("testEXCEL_95.xls", OldExcelFormatException.class); // Biff 5 / Excel 95
- EXCLUDED.put("43493.xls", RecordInputStream.LeftoverDataException.class); // HSSFWorkbook cannot open it as well
+ EXCLUDED.put("43493.xls", RecordFormatException.class); // HSSFWorkbook cannot open it as well
// EXCLUDED.put("44958_1.xls", RecordInputStream.LeftoverDataException.class);
EXCLUDED.put("50833.xls", IllegalArgumentException.class); // "Name is too long" when setting username
EXCLUDED.put("XRefCalc.xls", RuntimeException.class); // "Buffer overrun"
- EXCLUDED.put("61300.xls", RecordFormatException.class);
+ EXCLUDED.put("61300.xls", IndexOutOfBoundsException.class);
EXCLUDED.put("64130.xls", OldExcelFormatException.class); //Biff 5
}
@@ -68,11 +63,11 @@ public class TestBiffViewer extends BaseTestIteratingXLS {
}
}
- @Test
- @Ignore("only used for manual tests")
- @SuppressWarnings("java:S2699")
- public void testOneFile() throws Exception {
- POIDataSamples samples = POIDataSamples.getSpreadSheetInstance();
- runOneFile(samples.getFile("43493.xls"));
- }
+// @Test
+// @Ignore("only used for manual tests")
+// @SuppressWarnings("java:S2699")
+// public void testOneFile() throws Exception {
+// POIDataSamples samples = POIDataSamples.getSpreadSheetInstance();
+// runOneFile(samples.getFile("43493.xls"));
+// }
}