diff options
-rw-r--r-- | src/testcases/org/apache/poi/hssf/data/43251.xls | bin | 0 -> 166400 bytes | |||
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/data/43251.xls b/src/testcases/org/apache/poi/hssf/data/43251.xls Binary files differnew file mode 100644 index 0000000000..abc476ab0f --- /dev/null +++ b/src/testcases/org/apache/poi/hssf/data/43251.xls 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 @@ -1137,6 +1137,20 @@ extends TestCase { } /** + * 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 */ |