From 5028639443c4be5829d3cc5982565aebef5b73e6 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Wed, 15 Jun 2016 16:36:31 +0000 Subject: [PATCH] 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 --- .../poi/xssf/usermodel/TestXSSFBugs.java | 18 ++++++++++++++++++ test-data/spreadsheet/ExcelTables.xlsx | Bin 0 -> 9457 bytes 2 files changed, 18 insertions(+) create mode 100644 test-data/spreadsheet/ExcelTables.xlsx 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 942841bcc..31a54bf14 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..6d95446877d60010f62406f3cd44a46fd2ef16df G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