summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2008-02-21 16:22:18 +0000
committerNick Burch <nick@apache.org>2008-02-21 16:22:18 +0000
commitaea6bee863a24d2510df0c495eaeb11cc3dce77e (patch)
tree825ed92e3e59acdd6b3d04d30e21aabc30646c71 /src
parentb6b58b6d44bba25c4b389bbede71ed033c6305a6 (diff)
downloadpoi-aea6bee863a24d2510df0c495eaeb11cc3dce77e.tar.gz
poi-aea6bee863a24d2510df0c495eaeb11cc3dce77e.zip
Add a disabled test for a file with whacky StyleRecords that trigger an AIOOB
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@629849 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/testcases/org/apache/poi/hssf/data/OddStyleRecord.xlsbin0 -> 17408 bytes
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java18
2 files changed, 18 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/data/OddStyleRecord.xls b/src/testcases/org/apache/poi/hssf/data/OddStyleRecord.xls
new file mode 100644
index 0000000000..dcaa79b5e1
--- /dev/null
+++ b/src/testcases/org/apache/poi/hssf/data/OddStyleRecord.xls
Binary files differ
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index 6dfdddad44..dc38824d39 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -1089,6 +1089,24 @@ extends TestCase {
// "EmptyStackException"
//assertEquals("=CHOOSE(2,A2,A3,A4)", c2.getCellFormula());
}
+
+ /**
+ * Date: Tue, 19 Feb 2008 05:03:47 -0800 (PST)
+ * From: Setya <jsetya@gmail.com>
+ * Subject: Exception when parsing excel file
+ */
+ public void BROKENtest20080219() throws Exception {
+ FileInputStream in = new FileInputStream(new File(cwd, "OddStyleRecord.xls"));
+
+ // Blows up with an ArrayIndexOutOfBounds
+ // when creating a StyleRecord
+ // However, our code matches the latest Microsoft
+ // docs, so no idea what's wrong
+ HSSFWorkbook wb = new HSSFWorkbook(in);
+ in.close();
+
+ assertEquals(1, wb.getNumberOfSheets());
+ }
}