Add a sample Excel 3 file from TIKA-1515, and a disabled unit test for it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1651451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2015-01-13 19:32:50 +00:00
parent 26de25b7d3
commit 00e6e937f7
3 changed files with 23 additions and 0 deletions

View File

@ -38,6 +38,8 @@ public class TestBiffViewer extends BaseXLSIteratingTest {
SILENT_EXCLUDED.add("46904.xls");
SILENT_EXCLUDED.add("35897-type4.xls"); // unsupported crypto api header
SILENT_EXCLUDED.add("xor-encryption-abc.xls"); // unsupported XOR-encryption
SILENT_EXCLUDED.add("testEXCEL_2.xls"); // Biff 2 / Excel 2, pre-OLE2
SILENT_EXCLUDED.add("testEXCEL_3.xls"); // Biff 3 / Excel 3, pre-OLE2
SILENT_EXCLUDED.add("testEXCEL_4.xls"); // Biff 4 / Excel 4, pre-OLE2
SILENT_EXCLUDED.add("testEXCEL_5.xls"); // Biff 5 / Excel 5
SILENT_EXCLUDED.add("testEXCEL_95.xls"); // Biff 5 / Excel 95

View File

@ -38,6 +38,27 @@ public final class TestOldExcelExtractor extends POITestCase {
}
}
public void DISABLEDtestSimpleExcel3() {
OldExcelExtractor extractor = createExtractor("testEXCEL_3.xls");
// Check we can call getText without error
String text = extractor.getText();
// Check we find a few words we expect in there
assertContains(text, "Season beginning August");
assertContains(text, "USDA");
// Check we find a few numbers we expect in there
assertContains(text, "347");
assertContains(text, "228");
// Check we find a few string-literal dates in there
assertContains(text, "1981/82");
// Check the type
assertEquals(3, extractor.getBiffVersion());
assertEquals(0x10, extractor.getFileType());
}
public void testSimpleExcel4() {
OldExcelExtractor extractor = createExtractor("testEXCEL_4.xls");

Binary file not shown.