From: Nick Burch Date: Wed, 19 Mar 2008 12:01:32 +0000 (+0000) Subject: Add test to show that bug #43251 is already fixed X-Git-Tag: REL_3_0_3_BETA1~86 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=02831d348b494da54db06368ed17c919a565c1e9;p=poi.git Add test to show that bug #43251 is already fixed git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@638804 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/hssf/data/43251.xls b/src/testcases/org/apache/poi/hssf/data/43251.xls new file mode 100644 index 0000000000..abc476ab0f Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/43251.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 e7eff83e62..b534a8bbfb 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -1136,6 +1136,20 @@ extends TestCase { //assertEquals("=CHOOSE(2,A2,A3,A4)", c2.getCellFormula()); } + /** + * Something up with the FileSharingRecord + */ + public void test43251() throws Exception { + FileInputStream in = new FileInputStream(new File(cwd, "43251.xls")); + + // Used to blow up with an IllegalArgumentException + // when creating a FileSharingRecord + HSSFWorkbook wb = new HSSFWorkbook(in); + in.close(); + + assertEquals(1, wb.getNumberOfSheets()); + } + /** * Crystal reports generates files with short * StyleRecords, which is against the spec