diff options
author | Javen O'Neal <onealj@apache.org> | 2016-06-15 16:36:31 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-06-15 16:36:31 +0000 |
commit | a71a9df56692ae30e16d1a991e468104a1aebf7e (patch) | |
tree | 62d032ce425054746fbcaf8511db7a3e7ccd2a0f | |
parent | 367a78a40b88e5d84a500b71dc821bdad5490d0a (diff) | |
download | poi-a71a9df56692ae30e16d1a991e468104a1aebf7e.tar.gz poi-a71a9df56692ae30e16d1a991e468104a1aebf7e.zip |
add disabled unit test for bug 55273: contributed by Martin Studer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748606 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java | 18 | ||||
-rw-r--r-- | test-data/spreadsheet/ExcelTables.xlsx | bin | 0 -> 9457 bytes |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 942841bcc0..31a54bf14f 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -3049,4 +3049,22 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { nwb.close(); } + + @Ignore("currently fails on POI 3.15 beta 2") + @Test + public void test55273() { + Workbook wb = XSSFTestDataSamples.openSampleWorkbook("ExcelTables.xlsx"); + Sheet sheet = wb.getSheet("ExcelTable"); + + Name name = wb.getName("TableAsRangeName"); + assertEquals("TableName[#All]", name.getRefersToFormula()); + // POI 3.15-beta 2 (2016-06-15): getSheetName throws IllegalArgumentException: Invalid CellReference: TableName[#All] + assertEquals("TableName", name.getSheetName()); + + XSSFSheet xsheet = (XSSFSheet) sheet; + List<XSSFTable> tables = xsheet.getTables(); + assertEquals(2, tables.size()); //FIXME: how many tables are there in this spreadsheet? + assertEquals("Table1", tables.get(0).getName()); //FIXME: what is the table name? + assertEquals("Table2", tables.get(1).getName()); //FIXME: what is the table name? + } } diff --git a/test-data/spreadsheet/ExcelTables.xlsx b/test-data/spreadsheet/ExcelTables.xlsx Binary files differnew file mode 100644 index 0000000000..6d95446877 --- /dev/null +++ b/test-data/spreadsheet/ExcelTables.xlsx |