poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1761841 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java test-data/spreadsheet/45565.xls
Date Thu, 22 Sep 2016 03:29:00 GMT
Author: onealj
Date: Thu Sep 22 03:29:00 2016
New Revision: 1761841

URL: http://svn.apache.org/viewvc?rev=1761841&view=rev
Log:
bug 45565: add failing unit test for bug 45565

Added:
    poi/trunk/test-data/spreadsheet/45565.xls   (with props)
Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java?rev=1761841&r1=1761840&r2=1761841&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java Thu Sep
22 03:29:00 2016
@@ -16,6 +16,7 @@
 ==================================================================== */
 package org.apache.poi.extractor;
 
+import static org.apache.poi.POITestCase.assertContains;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -37,6 +38,7 @@ import org.apache.poi.hdgf.extractor.Vis
 import org.apache.poi.hpbf.extractor.PublisherTextExtractor;
 import org.apache.poi.hslf.extractor.PowerPointExtractor;
 import org.apache.poi.hsmf.extractor.OutlookTextExtactor;
+import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.OldExcelFormatException;
 import org.apache.poi.hssf.extractor.EventBasedExcelExtractor;
 import org.apache.poi.hssf.extractor.ExcelExtractor;
@@ -1019,4 +1021,15 @@ public class TestExtractorFactory {
             // expected here
         }
     }
+    
+    // This bug is currently open. This test will fail with "expected error not thrown" when
the bug has been fixed.
+    // When this happens, change this from @Test(expected=...) to @Test
+    @Test(expected=AssertionError.class)
+    public void test45565() throws Exception {
+        POITextExtractor extractor = ExtractorFactory.createExtractor(HSSFTestDataSamples.getSampleFile("45565.xls"));
+        String text = extractor.getText();
+        assertContains(text, "testdoc");
+        assertContains(text, "test phrase");
+        extractor.close();
+    }
 }

Added: poi/trunk/test-data/spreadsheet/45565.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/45565.xls?rev=1761841&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/45565.xls
------------------------------------------------------------------------------
    svn:mime-type = application/vnd.ms-excel



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


Mime
View raw message