]> source.dussan.org Git - poi.git/commitdiff
Stub unit tests for #57699
authorNick Burch <nick@apache.org>
Fri, 13 Mar 2015 16:46:15 +0000 (16:46 +0000)
committerNick Burch <nick@apache.org>
Fri, 13 Mar 2015 16:46:15 +0000 (16:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1666510 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

index b2edea6a3a5156bf497907571169fbbd1a1e6722..003c0eccf57295f0459f360a719d190ee3d30c82 100644 (file)
@@ -51,6 +51,7 @@ public class TestExtractorFactory extends TestCase {
 
     private File xls;
     private File xlsx;
+    private File xlsxStrict;
     private File xltx;
     private File xlsEmb;
 
@@ -90,6 +91,7 @@ public class TestExtractorFactory extends TestCase {
         POIDataSamples ssTests = POIDataSamples.getSpreadSheetInstance();
         xls = getFileAndCheck(ssTests, "SampleSS.xls");
         xlsx = getFileAndCheck(ssTests, "SampleSS.xlsx");
+        xlsxStrict = getFileAndCheck(ssTests, "SampleSS.strict.xlsx");
         xltx = getFileAndCheck(ssTests, "test.xltx");
         xlsEmb = getFileAndCheck(ssTests, "excel_with_embeded.xls");
 
@@ -159,6 +161,20 @@ public class TestExtractorFactory extends TestCase {
         );
         extractor.close();
 
+        // TODO Support OOXML-Strict, see bug #57699
+//        extractor = ExtractorFactory.createExtractor(xlsxStrict);
+//        assertTrue(
+//                extractor
+//                instanceof XSSFExcelExtractor
+//        );
+//        extractor.close();
+//
+//        extractor = ExtractorFactory.createExtractor(xlsxStrict);
+//        assertTrue(
+//                extractor.getText().contains("test")
+//        );
+//        extractor.close();
+
 
         // Word
         assertTrue(
index ad9c3ad6f874ba4f2e3ce29809ca1a0308476fd9..6334326c5e5b7d66894acccabd46d2477de695ea 100644 (file)
@@ -2290,4 +2290,16 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
                wb.close();
         }
     }
+    
+    /**
+     * OOXML-Strict files
+     */
+    @Test
+    @Ignore
+    public void test57699() throws Exception {
+        Workbook wb = XSSFTestDataSamples.openSampleWorkbook("sample.strict.xlsx");
+        assertEquals(3, wb.getNumberOfSheets());
+        
+        // TODO Check the rest
+    }
 }