From 31d7d9d7b4923e508c30ce4f8bd14591258f63f9 Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Tue, 16 Jan 2007 15:52:31 +0000 Subject: [PATCH] testcases for still unfixed bugs git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@496739 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/data/37684.xls | Bin 0 -> 32768 bytes .../org/apache/poi/hssf/data/41139.xls | Bin 0 -> 37376 bytes .../poi/hssf/usermodel/TestUnfixedBugs.java | 64 ++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 src/testcases/org/apache/poi/hssf/data/37684.xls create mode 100644 src/testcases/org/apache/poi/hssf/data/41139.xls diff --git a/src/testcases/org/apache/poi/hssf/data/37684.xls b/src/testcases/org/apache/poi/hssf/data/37684.xls new file mode 100644 index 0000000000000000000000000000000000000000..3aecf073c31c548f4199f22e7b2362d6e33405c4 GIT binary patch literal 32768 zcmeI530xJ|)xghV6T}5@LsVo_SzJ(10Z|r_9YI78MFbHAK~NyZ1!Y&Grb^YH+L#E5 zajCeAfy4z{nrf?wNi}NJPqbB&XcPL?Shq;exo^n8n>+oIev{1i_4h8nJ2UT`d*|Hw z&z-x>yPS9NW6P%M!#1};CyWC_c-dkGCT-*zJRaBj*#c1C(n23w_ha!GMf&jnh=7?X z-bfQ;c-Z4YhjR^hXb5l{4B(K_8QcQg!I%UKpesOP?kkH@v+V-&a&t1%vNG*{(h$hX zkgB0FG+@OWt1$r$$_!yUZo5ElRyr%T?Z&nTS=tk9I~J^9G5Er|(QEp6;TZt)PBrjn z>0W1B2e$2kTMfL&@_f!D!@&m5V)~Y%4OHDR7;6F`4>BPYvf-!H_Ju06HVInonrPzC zW(MTKeB2KQ(rZwEf{oT1;5gXP(S4@Nm?Y=c4@oYzM)vrm z_id-29-BUUM*Bn#&;k01iH5qjKM#JUQw;)BaL`Sqb2cIAXmEuQ05hp5u6C^@6Fw$6 zGeMHe7(w7L!~x4a)7gI}S{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zZ9`jd?2VWV~x(oOzWn$pJ Q>dhp?vuhFg-)E)&|F!Rj{r~^~ literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java index 71fe866caf..ef1e410c46 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java @@ -16,6 +16,9 @@ ==================================================================== */ package org.apache.poi.hssf.usermodel; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.FileInputStream; import junit.framework.TestCase; @@ -38,6 +41,8 @@ public class TestUnfixedBugs extends TestCase { } + protected String cwd = System.getProperty("HSSF.testdata.path"); + /* ArrayIndexOutOfBound in BOFRecord */ public void test28772() throws java.io.IOException { @@ -47,5 +52,64 @@ public class TestUnfixedBugs extends TestCase { HSSFWorkbook wb = new HSSFWorkbook(in); assertTrue("Read book fine!" , true); } + + /** + * Bug 37684: Unhandled Continue Record Error + * + * BUT NOW(Jan07): It triggers bug 41026!! + * + * java.lang.ArrayIndexOutOfBoundsException: 30 + at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.rowHasCells(ValueRecordsAggregate.java:219) + */ + public void test37684() throws Exception { + FileInputStream in = new FileInputStream(new File(cwd, "37684.xls")); + HSSFWorkbook wb = new HSSFWorkbook(in); + in.close(); + + HSSFSheet sheet = wb.getSheetAt( 0 ); + assertNotNull(sheet); + + assertTrue("No Exceptions while reading file", true); + + //serialize and read again + ByteArrayOutputStream out = new ByteArrayOutputStream(); + wb.write(out); + out.close(); + + wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray())); + assertTrue("No Exceptions while reading file", true); + + } + + /** + * Bug 41139: Constructing HSSFWorkbook is failed,threw threw ArrayIndexOutOfBoundsException for creating UnknownRecord + * + * BUT NOW (Jan07): It throws the following in write!! + * java.lang.RuntimeException: Coding Error: This method should never be called. This ptg should be converted + at org.apache.poi.hssf.record.formula.AreaNPtg.writeBytes(AreaNPtg.java:54) + at org.apache.poi.hssf.record.formula.Ptg.serializePtgStack(Ptg.java:384) + at org.apache.poi.hssf.record.NameRecord.serialize(NameRecord.java:544) + at org.apache.poi.hssf.model.Workbook.serialize(Workbook.java:757) + at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:952) + at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:898) + + */ + public void test41139() throws Exception { + FileInputStream in = new FileInputStream(new File(cwd, "41139.xls")); + HSSFWorkbook wb = new HSSFWorkbook(in); + in.close(); + + assertTrue("No Exceptions while reading file", true); + + //serialize and read again + ByteArrayOutputStream out = new ByteArrayOutputStream(); + wb.write(out); + out.close(); + + wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray())); + assertTrue("No Exceptions while reading file", true); + + } + } -- 2.39.5