From: Avik Sengupta Date: Mon, 27 Oct 2003 03:04:11 +0000 (+0000) Subject: Added testcases for the double byte string read error. X-Git-Tag: REL_2_5_1~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=efff225a03104a67052d0af127daadd127a23fb4;p=poi.git Added testcases for the double byte string read error. We need to careful about regressions, particularly in HEAD git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353415 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/hssf/data/12561-1.xls b/src/testcases/org/apache/poi/hssf/data/12561-1.xls new file mode 100755 index 0000000000..40b7276cb8 Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/12561-1.xls differ diff --git a/src/testcases/org/apache/poi/hssf/data/12561-2.xls b/src/testcases/org/apache/poi/hssf/data/12561-2.xls new file mode 100755 index 0000000000..bb360c1ab4 Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/12561-2.xls differ diff --git a/src/testcases/org/apache/poi/hssf/data/15556.xls b/src/testcases/org/apache/poi/hssf/data/15556.xls new file mode 100644 index 0000000000..82b48a55bc Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/15556.xls differ diff --git a/src/testcases/org/apache/poi/hssf/data/22742.xls b/src/testcases/org/apache/poi/hssf/data/22742.xls new file mode 100644 index 0000000000..cd367ca9b6 Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/22742.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 d49cf64f79..b27f352564 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -287,6 +287,55 @@ extends TestCase { System.out.println(io_Excp.getMessage()) ; } } + + /**Double byte strings*/ + public void test15556() throws java.io.IOException { + + String filename = System.getProperty("HSSF.testdata.path"); + filename=filename+"/15556.xls"; + FileInputStream in = new FileInputStream(filename); + HSSFWorkbook wb = new HSSFWorkbook(in); + HSSFSheet sheet = wb.getSheetAt(0); + HSSFRow row = sheet.getRow(45); + this.assertTrue("Read row fine!" , true); + + } + + /*Double byte strings */ + public void test22742() throws java.io.IOException { + String filename = System.getProperty("HSSF.testdata.path"); + filename=filename+"/22742.xls"; + FileInputStream in = new FileInputStream(filename); + HSSFWorkbook wb = new HSSFWorkbook(in); + //HSSFSheet sheet = wb.getSheetAt(0); + //HSSFRow row = sheet.getRow(45); + this.assertTrue("Read workbook!" , true); + + } + /*Double byte strings */ + public void test12561_1() throws java.io.IOException { + + String filename = System.getProperty("HSSF.testdata.path"); + filename=filename+"/12561-1.xls"; + FileInputStream in = new FileInputStream(filename); + HSSFWorkbook wb = new HSSFWorkbook(in); + //HSSFSheet sheet = wb.getSheetAt(0); + //HSSFRow row = sheet.getRow(45); + this.assertTrue("Read workbook!" , true); + + } + /*Double byte strings */ + public void test12561_2() throws java.io.IOException { + + String filename = System.getProperty("HSSF.testdata.path"); + filename=filename+"/12561-2.xls"; + FileInputStream in = new FileInputStream(filename); + HSSFWorkbook wb = new HSSFWorkbook(in); + //HSSFSheet sheet = wb.getSheetAt(0); + //HSSFRow row = sheet.getRow(45); + this.assertTrue("Read workbook!" , true); + + } }