]> source.dussan.org Git - poi.git/commitdiff
Add simple unit test to verify that Bug 42016 was fixed already by some other fixes
authorDominik Stadler <centic@apache.org>
Mon, 28 Jul 2014 19:10:54 +0000 (19:10 +0000)
committerDominik Stadler <centic@apache.org>
Mon, 28 Jul 2014 19:10:54 +0000 (19:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1614135 13f79535-47bb-0310-9956-ffa450edef68

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

index de12602e40fd3cdb9bdd4dfea1cb1272930cbc7a..543ec99ebc6f84fb2a61bd0d4a7a60e1eaacbe9b 100644 (file)
@@ -2722,4 +2722,13 @@ public final class TestBugs extends BaseTestBugzillaIssues {
         FormulaEvaluator eval = wb.getCreationHelper().createFormulaEvaluator();
         assertEquals("4.0", eval.evaluate(intF).formatAsString());
     }
+
+    @Test
+    public void bug42016() {
+        Workbook wb = openSample("42016.xls");
+        Sheet s = wb.getSheetAt(0);
+        for(int row = 0;row < 7;row++) {
+            assertEquals("A$1+B$1", s.getRow(row).getCell(2).getCellFormula());
+        }        
+    }
 }
diff --git a/test-data/spreadsheet/42016.xls b/test-data/spreadsheet/42016.xls
new file mode 100644 (file)
index 0000000..4cbdab7
Binary files /dev/null and b/test-data/spreadsheet/42016.xls differ