mirror of https://github.com/apache/poi.git
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
This commit is contained in:
parent
db84a25649
commit
809a2923c9
|
@ -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 "));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue