]> source.dussan.org Git - poi.git/commitdiff
Add unit test which verifies that bug 53105 is actually fixed now
authorDominik Stadler <centic@apache.org>
Thu, 3 Sep 2015 20:46:14 +0000 (20:46 +0000)
committerDominik Stadler <centic@apache.org>
Thu, 3 Sep 2015 20:46:14 +0000 (20:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701133 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
test-data/spreadsheet/53105.xlsx [new file with mode: 0644]

index 5fccecc68173c196a807bd52701021ddba85f4cf..41e0580b70b4fba6261f6c95cf7b53961451fd5f 100644 (file)
@@ -2616,4 +2616,21 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
         
         wb.close();
     }
+
+    @Test
+    public void test53105() throws IOException {
+        Workbook wb = XSSFTestDataSamples.openSampleWorkbook("53105.xlsx");
+        assertNotNull(wb);
+        
+
+        // Act
+        // evaluate SUM('Skye Lookup Input'!A4:XFD4), cells in range each contain "1"
+        FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
+        double numericValue = evaluator.evaluate(wb.getSheetAt(0).getRow(1).getCell(0)).getNumberValue();
+
+        // Assert
+        assertEquals(16384.0, numericValue, 0.0);
+    
+        wb.close();
+    }
 }
diff --git a/test-data/spreadsheet/53105.xlsx b/test-data/spreadsheet/53105.xlsx
new file mode 100644 (file)
index 0000000..80ec056
Binary files /dev/null and b/test-data/spreadsheet/53105.xlsx differ