]> source.dussan.org Git - poi.git/commitdiff
Add tests from bug 45353 to show that this now works fine
authorDominik Stadler <centic@apache.org>
Fri, 10 Mar 2017 20:14:00 +0000 (20:14 +0000)
committerDominik Stadler <centic@apache.org>
Fri, 10 Mar 2017 20:14:00 +0000 (20:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1786432 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
test-data/spreadsheet/named-cell-in-formula-test.xls [new file with mode: 0644]
test-data/spreadsheet/named-cell-test.xls [new file with mode: 0644]

index 27186886474d2b61df0c99a9056b01d416701313..b84c953cf6456e64cdce1009165326c2f50970b5 100644 (file)
@@ -3080,4 +3080,18 @@ public final class TestBugs extends BaseTestBugzillaIssues {
         //fos.close();
         wb.close();
     }
+
+    @Test
+    public void test45353a() throws IOException {
+        final Workbook wb = HSSFTestDataSamples.openSampleWorkbook("named-cell-in-formula-test.xls");
+        wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
+        wb.close();
+    }
+
+    @Test
+    public void test45353b() throws IOException {
+        final Workbook wb = HSSFTestDataSamples.openSampleWorkbook("named-cell-test.xls");
+        wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
+        wb.close();
+    }
 }
diff --git a/test-data/spreadsheet/named-cell-in-formula-test.xls b/test-data/spreadsheet/named-cell-in-formula-test.xls
new file mode 100644 (file)
index 0000000..3d70bab
Binary files /dev/null and b/test-data/spreadsheet/named-cell-in-formula-test.xls differ
diff --git a/test-data/spreadsheet/named-cell-test.xls b/test-data/spreadsheet/named-cell-test.xls
new file mode 100644 (file)
index 0000000..72890ae
Binary files /dev/null and b/test-data/spreadsheet/named-cell-test.xls differ