Stub unit tests for #57699

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1666510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2015-03-13 16:46:15 +00:00
parent e369d1c121
commit ace2354d6c
2 changed files with 28 additions and 0 deletions

View 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(

View 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
}
}