]> source.dussan.org Git - poi.git/commitdiff
new test case for 47731 issue
authorSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:55:57 +0000 (18:55 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:55:57 +0000 (18:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150463 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java
test-data/document/Bug47731.doc [new file with mode: 0644]

index a93db00ec5e7190553761f5b33661c1f49a42192..fae45758ac4322925cca9c7d9a60af191f16868b 100644 (file)
@@ -708,6 +708,28 @@ public final class TestProblems extends HWPFTestCase {
         insertTable( 3, 3 );
     }
 
+    /**
+     * [FAILING] Bug 47731 - Word Extractor considers text copied from some
+     * website as an embedded object
+     */
+    public void test47731() throws Exception
+    {
+        HWPFDocument doc = HWPFTestDataSamples.openSampleFile( "Bug47731.doc" );
+        String foundText = new WordExtractor( doc ).getText();
+
+        try
+        {
+            assertTrue( foundText
+                    .contains( "Soak the rice in water for three to four hours" ) );
+
+            fixed( "47731" );
+        }
+        catch ( AssertionFailedError exc )
+        {
+            // expected
+        }
+    }
+
     /**
      * Bug 4774 - text extracted by WordExtractor is broken
      */
diff --git a/test-data/document/Bug47731.doc b/test-data/document/Bug47731.doc
new file mode 100644 (file)
index 0000000..c8cd88d
Binary files /dev/null and b/test-data/document/Bug47731.doc differ