poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r832644 - /poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
Date Wed, 04 Nov 2009 01:35:55 GMT
Author: nick
Date: Wed Nov  4 01:35:55 2009
New Revision: 832644

URL: http://svn.apache.org/viewvc?rev=832644&view=rev
Log:
Add test that shows we can already extract text from .docm files

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java?rev=832644&r1=832643&r2=832644&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
Wed Nov  4 01:35:55 2009
@@ -207,4 +207,16 @@
         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 "));
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message