From f6e2b0a90d562f1f8fd7705b83eb07aa51c70400 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Thu, 21 Jul 2011 13:56:20 +0000 Subject: [PATCH] Add a disabled unit test for bug #51535 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149181 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/usermodel/TestBugs.java | 32 ++++++++++++++++++ test-data/spreadsheet/51535.xls | Bin 0 -> 41984 bytes 2 files changed, 32 insertions(+) create mode 100644 test-data/spreadsheet/51535.xls diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 098244165..25ad94e35 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -21,6 +21,7 @@ import junit.framework.AssertionFailedError; import org.apache.poi.hssf.HSSFITestDataProvider; import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.hssf.OldExcelFormatException; +import org.apache.poi.hssf.extractor.ExcelExtractor; import org.apache.poi.hssf.model.InternalWorkbook; import org.apache.poi.hssf.record.*; import org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate; @@ -2141,4 +2142,35 @@ if(1==2) { assertEquals(2, wbPOIFS.getNumberOfSheets()); assertEquals(2, wbNPOIFS.getNumberOfSheets()); } + + /** + * Large row numbers + */ + public void DISABLEDtest51535() throws Exception { + byte[] data = HSSFITestDataProvider.instance.getTestDataFileContent("51535.xls"); + + HSSFWorkbook wbPOIFS = new HSSFWorkbook(new POIFSFileSystem( + new ByteArrayInputStream(data)).getRoot(), false); + HSSFWorkbook wbNPOIFS = new HSSFWorkbook(new NPOIFSFileSystem( + new ByteArrayInputStream(data)).getRoot(), false); + + for(HSSFWorkbook wb : new HSSFWorkbook[] {wbPOIFS, wbNPOIFS}) { + assertEquals(3, wb.getNumberOfSheets()); + + // Check directly + HSSFSheet s = wb.getSheetAt(0); + assertEquals("Top Left Cell", s.getRow(0).getCell(0).getStringCellValue()); + assertEquals("Top Right Cell", s.getRow(0).getCell(255).getStringCellValue()); + assertEquals("Bottom Left Cell", s.getRow(65535).getCell(0).getStringCellValue()); + assertEquals("Bottom Right Cell", s.getRow(65535).getCell(255).getStringCellValue()); + + // Extract and check + ExcelExtractor ex = new ExcelExtractor(wb); + String text = ex.getText(); + assertTrue(text.contains("Top Left Cell")); + assertTrue(text.contains("Top Right Cell")); + assertTrue(text.contains("Bottom Left Cell")); + assertTrue(text.contains("Bottom Right Cell")); + } + } } diff --git a/test-data/spreadsheet/51535.xls b/test-data/spreadsheet/51535.xls new file mode 100644 index 0000000000000000000000000000000000000000..ab73352b8a567fa01b8a38eee1877dd199c6a44a GIT binary patch literal 41984 zcmeI*eYE3dec*BV>duTOGbA%nG6@mPT%x=YB||a_X;MQbiAsR=u$S^pe@JjHmuKS|L~>lsY@vs_RzX;y6ZhH z#O>*eA-CU0y1st*olCQvg(J`T*w$m|`8|5{=x0mT`2OJ^?EU)3f8&ZjlSXcLNV4?8 z+D>WvKzWYmLUP+9N%!(ZOuw+Uww4x35>K<+4^R($m$p8@#*;CRZ4ldh2lCj73$P2j z@e*8!i@*?&_TpkFxCEDCA1=e?cqy)cikIQ#*pCBPz$23TwnymX9>4l}FO`>E)I?nTxGb+7~_&Ht|`;TbDj9G_X`os09ZH&5Q$w}I< zm~4TqwdXeC_tyP<p@PWo^2pXXkZ{v2Me73CiDG#a(`uVe9>+)zLJ#OOm_Mz^XH`xh#s2z zt5596nT&)JjD$xSA;-x$|NqSKIAiZN>2snJHd^|&^>!XjT6)8TIfmC|e$zR=N*|3z z8LmV0*xpTh?2=9Ac+IAB+_A|VIWqfje~h*?$NR+WImA23?5&^UeQ~ooF4&}wIo=~T zi;~|o%Fd~E?4SP;a`Q{2oW>ic#=o1`kr$*ZrJt7W&RxkH;#+w$o&4JV`McQR_fKEc zmfj>SO2?$1m|2O*r-%cCl^moEvs*Df$Nu?y*%`0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