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 000000000..dcaa79b5e Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/OddStyleRecord.xls differ diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 6dfdddad4..dc38824d3 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 + * 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()); + } }