]> source.dussan.org Git - poi.git/commitdiff
test for TIKA-2163
authorPJ Fanning <fanningpj@apache.org>
Tue, 30 Aug 2022 11:44:27 +0000 (11:44 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 30 Aug 2022 11:44:27 +0000 (11:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903777 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/test/java/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
test-data/document/ChronologicalResume.dotx [new file with mode: 0644]

index 12c6bc97b65a627274cb46b48ac3a1a2a3747d5f..6adbf31b1e61f776de7a6dd694752a4b5a2b0675 100644 (file)
@@ -487,4 +487,13 @@ class TestXWPFWordExtractor {
             assertEquals( "The following word is: CAPITALIZED.", txt.trim());
         }
     }
+
+    @Test
+    void testTika2163() throws IOException {
+        try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("ChronologicalResume.dotx");
+             XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) {
+            String txt = extractor.getText();
+            assertContains(txt, "but a great-looking résumé doesn’t have to be!");
+        }
+    }
 }
diff --git a/test-data/document/ChronologicalResume.dotx b/test-data/document/ChronologicalResume.dotx
new file mode 100644 (file)
index 0000000..5d24a78
Binary files /dev/null and b/test-data/document/ChronologicalResume.dotx differ