Testcase for 24215. sync from branch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353423 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
003c0e8b30
commit
c66f42d340
BIN
src/testcases/org/apache/poi/hssf/data/24215.xls
Normal file
BIN
src/testcases/org/apache/poi/hssf/data/24215.xls
Normal file
Binary file not shown.
@ -79,8 +79,7 @@ extends TestCase {
|
||||
/** Test reading AND writing a complicated workbook
|
||||
*Test opening resulting sheet in excel*/
|
||||
public void test15228()
|
||||
throws java.io.IOException
|
||||
{
|
||||
throws java.io.IOException {
|
||||
String readFilename = System.getProperty("HSSF.testdata.path");
|
||||
FileInputStream in = new FileInputStream(readFilename+File.separator+"15228.xls");
|
||||
HSSFWorkbook wb = new HSSFWorkbook(in);
|
||||
@ -97,8 +96,7 @@ extends TestCase {
|
||||
}
|
||||
|
||||
public void test13796()
|
||||
throws java.io.IOException
|
||||
{
|
||||
throws java.io.IOException {
|
||||
String readFilename = System.getProperty("HSSF.testdata.path");
|
||||
FileInputStream in = new FileInputStream(readFilename+File.separator+"13796.xls");
|
||||
HSSFWorkbook wb = new HSSFWorkbook(in);
|
||||
@ -363,13 +361,34 @@ extends TestCase {
|
||||
|
||||
/** Illegal argument exception - cannot store duplicate value in Map*/
|
||||
public void test19599() throws java.io.IOException {
|
||||
FileInputStream in = new FileInputStream("19599-1.xls");
|
||||
String filename = System.getProperty("HSSF.testdata.path");
|
||||
FileInputStream in = new FileInputStream(filename+"/19599-1.xls");
|
||||
HSSFWorkbook wb = new HSSFWorkbook(in);
|
||||
in = new FileInputStream("19599-2.xls");
|
||||
in = new FileInputStream(filename+"/19599-2.xls");
|
||||
wb = new HSSFWorkbook(in);
|
||||
this.assertTrue("Read workbook, No exceptions" , true);
|
||||
|
||||
}
|
||||
|
||||
public void test24215() throws Exception {
|
||||
String filename = System.getProperty("HSSF.testdata.path");
|
||||
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(filename+"/24215.xls"));
|
||||
|
||||
for (int sheetIndex = 0; sheetIndex < wb.getNumberOfSheets();sheetIndex++) {
|
||||
HSSFSheet sheet = wb.getSheetAt(sheetIndex);
|
||||
int rows = sheet.getLastRowNum();
|
||||
|
||||
for (int rowIndex = 0; rowIndex < rows; rowIndex++) {
|
||||
HSSFRow row = sheet.getRow(rowIndex);
|
||||
int cells = row.getLastCellNum();
|
||||
|
||||
for (short cellIndex = 0; cellIndex < cells; cellIndex++) {
|
||||
HSSFCell cell = row.getCell(cellIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
assertTrue("No Exceptions while reading file", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user