aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases/org/apache/poi/xwpf
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2009-11-04 01:35:55 +0000
committerNick Burch <nick@apache.org>2009-11-04 01:35:55 +0000
commit809a2923c96c63b7988171ff7b32b5e5e76445b0 (patch)
tree6bc925644e6a2957b2c33173ec95ac6a2c724215 /src/ooxml/testcases/org/apache/poi/xwpf
parentdb84a256498e6b022038b6ab567b8b8f7dd17f95 (diff)
downloadpoi-809a2923c96c63b7988171ff7b32b5e5e76445b0.tar.gz
poi-809a2923c96c63b7988171ff7b32b5e5e76445b0.zip
Add test that shows we can already extract text from .docm files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@832644 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi/xwpf')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
index a3a4c944f7..ddc0957aa0 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
@@ -207,4 +207,16 @@ public class TestXWPFWordExtractor extends TestCase {
assertTrue(extractor.getText().contains("Section 3"));
}
+ /**
+ * Test that we can open and process .docm
+ * (macro enabled) docx files (bug #45690)
+ */
+ public void testDOCMFiles() {
+ XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("45690.docm");
+ XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
+
+ assertTrue(extractor.getText().contains("2004"));
+ assertTrue(extractor.getText().contains("2008"));
+ assertTrue(extractor.getText().contains("(120 "));
+ }
}