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:
Nick Burch 2008-01-25 16:33:59 +00:00
parent f57fda3af5
commit fdcd7c3fb8
2 changed files with 19 additions and 1 deletions

Binary file not shown.

View File

@ -1008,9 +1008,27 @@ extends TestCase {
wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
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);
}
}