Added test to show that bug #41546 is already fixed. Also rename a test file to be more consistent
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@638803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e43893df07
commit
a0d0fd14ef
BIN
src/testcases/org/apache/poi/hssf/data/41546.xls
Normal file
BIN
src/testcases/org/apache/poi/hssf/data/41546.xls
Normal file
Binary file not shown.
@ -1034,6 +1034,28 @@ extends TestCase {
|
|||||||
assertTrue("No Exceptions while reading file", true);
|
assertTrue("No Exceptions while reading file", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bug 41546: Constructing HSSFWorkbook is failed,
|
||||||
|
* Unknown Ptg in Formula: 0x1a (26)
|
||||||
|
*/
|
||||||
|
public void test41546() throws Exception {
|
||||||
|
FileInputStream in = new FileInputStream(new File(cwd, "41546.xls"));
|
||||||
|
HSSFWorkbook wb = new HSSFWorkbook(in);
|
||||||
|
in.close();
|
||||||
|
|
||||||
|
assertTrue("No Exceptions while reading file", true);
|
||||||
|
assertEquals(1, wb.getNumberOfSheets());
|
||||||
|
|
||||||
|
//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);
|
||||||
|
assertEquals(1, wb.getNumberOfSheets());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bug 42564: Some files from Access were giving a RecordFormatException
|
* Bug 42564: Some files from Access were giving a RecordFormatException
|
||||||
* when reading the BOFRecord
|
* when reading the BOFRecord
|
||||||
@ -1157,7 +1179,7 @@ extends TestCase {
|
|||||||
* probably due to dropdowns
|
* probably due to dropdowns
|
||||||
*/
|
*/
|
||||||
public void test44593() throws Exception {
|
public void test44593() throws Exception {
|
||||||
FileInputStream in = new FileInputStream(new File(cwd, "Bug44593.xls"));
|
FileInputStream in = new FileInputStream(new File(cwd, "44593.xls"));
|
||||||
|
|
||||||
// Used to blow up with an IllegalArgumentException
|
// Used to blow up with an IllegalArgumentException
|
||||||
// when creating a DVRecord
|
// when creating a DVRecord
|
||||||
|
Loading…
Reference in New Issue
Block a user