mirror of https://github.com/apache/poi.git
Add broken test for bug #43901
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@634372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
90f746711e
commit
943dabce28
|
@ -1104,6 +1104,29 @@ extends TestCase {
|
|||
|
||||
assertEquals(1, wb.getNumberOfSheets());
|
||||
}
|
||||
|
||||
/**
|
||||
* POI is producing files with the wrong last-column
|
||||
* number on the row
|
||||
*/
|
||||
public void BROKENtest43901() {
|
||||
HSSFWorkbook book = new HSSFWorkbook();
|
||||
HSSFSheet sheet = book.createSheet("test");
|
||||
|
||||
// New row has last col -1
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
assertEquals(-1, row.getLastCellNum());
|
||||
if(row.getLastCellNum() == 0) {
|
||||
fail("Identified bug 43901");
|
||||
}
|
||||
|
||||
// Create two cells, will return one higher
|
||||
// than that for the last number
|
||||
row.createCell((short) 0);
|
||||
assertEquals(1, row.getLastCellNum());
|
||||
row.createCell((short) 255);
|
||||
assertEquals(256, row.getLastCellNum());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue