]> source.dussan.org Git - poi.git/commitdiff
[bug-66827] add test case (that passes) - so issue is nor reproduced
authorPJ Fanning <fanningpj@apache.org>
Tue, 1 Aug 2023 20:49:26 +0000 (20:49 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 1 Aug 2023 20:49:26 +0000 (20:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911399 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
test-data/spreadsheet/bug66827.xlsx [new file with mode: 0644]

index fe3ac973cd0a96ebb51a1282c944989f3fbb0519..3c55db989dd42bbc0dffa8ccbbcf2828a146ed95 100644 (file)
@@ -3881,6 +3881,20 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
         }
     }
 
+    @Test
+    void testBug66827() throws Exception {
+        final int expectedCount = 6;
+        try (XSSFWorkbook wb = openSampleWorkbook("bug66827.xlsx")) {
+            SharedStringsTable sst = wb.getSharedStringSource();
+            assertNotNull(sst);
+            assertEquals(expectedCount, sst.getCount());
+            for (int i = 0; i < expectedCount; i++) {
+                assertNotNull(sst.getItemAt(i));
+            }
+
+        }
+    }
+
     private static void readByCommonsCompress(File temp_excel_poi) throws IOException {
         /* read by commons-compress*/
         try (ZipFile zipFile = new ZipFile(temp_excel_poi)) {
diff --git a/test-data/spreadsheet/bug66827.xlsx b/test-data/spreadsheet/bug66827.xlsx
new file mode 100644 (file)
index 0000000..9855006
Binary files /dev/null and b/test-data/spreadsheet/bug66827.xlsx differ