Add a test to show the bug #42618 appears to be incorrect
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@615259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f57fda3af5
commit
fdcd7c3fb8
BIN
src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls
Executable file
BIN
src/testcases/org/apache/poi/hssf/data/SimpleWithChoose.xls
Executable file
Binary file not shown.
@ -1008,9 +1008,27 @@ extends TestCase {
|
|||||||
|
|
||||||
wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
||||||
assertTrue("No Exceptions while reading file", true);
|
assertTrue("No Exceptions while reading file", true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bug 42618: RecordFormatException reading a file containing
|
||||||
|
* =CHOOSE(2,A2,A3,A4)
|
||||||
|
*/
|
||||||
|
public void test42618() throws Exception {
|
||||||
|
FileInputStream in = new FileInputStream(new File(cwd, "SimpleWithChoose.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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user