Add test to show that bug #44693 is incorrect
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@642231 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e35b2475d
commit
7061aef6f1
BIN
src/testcases/org/apache/poi/hssf/data/44693.xls
Normal file
BIN
src/testcases/org/apache/poi/hssf/data/44693.xls
Normal file
Binary file not shown.
@ -1218,6 +1218,30 @@ extends TestCase {
|
||||
|
||||
assertEquals(1, wb.getNumberOfSheets());
|
||||
}
|
||||
|
||||
/**
|
||||
* User reported the wrong number of rows from the
|
||||
* iterator, but we can't replicate that
|
||||
*/
|
||||
public void test44693() throws Exception {
|
||||
FileInputStream in = new FileInputStream(new File(cwd, "44693.xls"));
|
||||
|
||||
HSSFWorkbook wb = new HSSFWorkbook(in);
|
||||
HSSFSheet s = wb.getSheetAt(0);
|
||||
|
||||
// Rows are 1 to 713
|
||||
assertEquals(0, s.getFirstRowNum());
|
||||
assertEquals(712, s.getLastRowNum());
|
||||
assertEquals(713, s.getPhysicalNumberOfRows());
|
||||
|
||||
// Now check the iterator
|
||||
int rowsSeen = 0;
|
||||
for(Iterator i = s.rowIterator(); i.hasNext(); ) {
|
||||
HSSFRow r = (HSSFRow)i.next();
|
||||
rowsSeen++;
|
||||
}
|
||||
assertEquals(713, rowsSeen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user