Repository: tika
Updated Branches:
  refs/heads/2.x 337d38304 -> 4383e3da7


http://git-wip-us.apache.org/repos/asf/tika/blob/4383e3da/tika-parser-modules/tika-parser-office-module/src/test/java/org/apache/tika/parser/wordperfect/WordPerfectTest.java
----------------------------------------------------------------------
diff --git 
a/tika-parser-modules/tika-parser-office-module/src/test/java/org/apache/tika/parser/wordperfect/WordPerfectTest.java
 
b/tika-parser-modules/tika-parser-office-module/src/test/java/org/apache/tika/parser/wordperfect/WordPerfectTest.java
new file mode 100644
index 0000000..38675aa
--- /dev/null
+++ 
b/tika-parser-modules/tika-parser-office-module/src/test/java/org/apache/tika/parser/wordperfect/WordPerfectTest.java
@@ -0,0 +1,39 @@
+/* Copyright 2016 Norconex Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tika.parser.wordperfect;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tika.TikaTest;
+import org.apache.tika.metadata.Metadata;
+import org.junit.Test;
+
+/**
+ * Junit test class for the {@link WordPerfectParser}.
+ * @author Pascal Essiembre
+ */
+public class WordPerfectTest extends TikaTest {
+
+
+    @Test
+    public void testWordPerfectParser() throws Exception {
+
+        XMLResult r = getXML("testWordPerfect.wpd");
+        assertEquals("application/vnd.wordperfect", 
+                r.metadata.get(Metadata.CONTENT_TYPE));
+        assertEquals(1, r.metadata.getValues(Metadata.CONTENT_TYPE).length);
+        assertContains("test test", r.xml);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tika/blob/4383e3da/tika-test-resources/src/test/resources/test-documents/testWordPerfect.wpd
----------------------------------------------------------------------
diff --git 
a/tika-test-resources/src/test/resources/test-documents/testWordPerfect.wpd 
b/tika-test-resources/src/test/resources/test-documents/testWordPerfect.wpd
new file mode 100644
index 0000000..4c6ae5d
Binary files /dev/null and 
b/tika-test-resources/src/test/resources/test-documents/testWordPerfect.wpd 
differ

Reply via email to