You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2016/12/01 00:20:56 UTC
tika git commit: TIKA-2187 -- fixed test
Repository: tika
Updated Branches:
refs/heads/master fe20ecd83 -> 09931fe42
TIKA-2187 -- fixed test
Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/09931fe4
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/09931fe4
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/09931fe4
Branch: refs/heads/master
Commit: 09931fe4227478516bf067bbb08056f49a506dfa
Parents: fe20ecd
Author: tballison <ta...@mitre.org>
Authored: Wed Nov 30 19:20:48 2016 -0500
Committer: tballison <ta...@mitre.org>
Committed: Wed Nov 30 19:20:48 2016 -0500
----------------------------------------------------------------------
.../org/apache/tika/parser/microsoft/WordParserTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tika/blob/09931fe4/tika-parsers/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java
----------------------------------------------------------------------
diff --git a/tika-parsers/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java b/tika-parsers/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java
index c7808d0..9660363 100644
--- a/tika-parsers/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java
+++ b/tika-parsers/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java
@@ -538,8 +538,11 @@ public class WordParserTest extends TikaTest {
@Test
public void testDeleted() throws Exception {
//test classic behavior
- assertNotContained("frog", getXML("testWORD_2006ml.doc").xml);
+ String xml = getXML("testWORD_2006ml.doc").xml;
+ assertNotContained("frog", xml);
+ //moveFrom is deleted in .doc files
+ assertContainsCount("Second paragraph", xml, 1);
//now test inclusion of deleted text
ParseContext context = new ParseContext();
OfficeParserConfig officeParserConfig = new OfficeParserConfig();
@@ -547,6 +550,9 @@ public class WordParserTest extends TikaTest {
context.set(OfficeParserConfig.class, officeParserConfig);
XMLResult r = getXML("testWORD_2006ml.doc", context);
assertContains("frog", r.xml);
+
+ //moveFrom is deleted in .doc files
+ assertContainsCount("Second paragraph", r.xml, 2);
}
}