diff options
author | Nick Burch <nick@apache.org> | 2015-08-01 00:01:56 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-08-01 00:01:56 +0000 |
commit | 8472bdb56a86f5c6a43d12cf254f5a68586d137a (patch) | |
tree | 0c376e160e788c745440ae4059e1cf72d557c26f /src/testcases/org/apache/poi/ss/usermodel | |
parent | 044151f658d7c1f5dec9087e6acd2a7e47452390 (diff) | |
download | poi-8472bdb56a86f5c6a43d12cf254f5a68586d137a.tar.gz poi-8472bdb56a86f5c6a43d12cf254f5a68586d137a.zip |
Further unit tests for #55747
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1693675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 9161b0a98f..83450e45d4 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -37,7 +37,6 @@ import org.apache.poi.ss.ITestDataProvider; import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.SheetUtil; -import org.apache.poi.util.StringUtil; import org.junit.Assume; import org.junit.Ignore; import org.junit.Test; @@ -1150,5 +1149,27 @@ public abstract class BaseTestBugzillaIssues { cell.setCellFormula("IF(A1<>\"\",IF(C1<>\"\",MID(A1,1,2),\"c1\"),\"c2\")"); ev.evaluateAll(); assertEquals("ab", cell.getStringCellValue()); + + // Write it back out, and re-read + wb = _testDataProvider.writeOutAndReadBack(wb); + ev = wb.getCreationHelper().createFormulaEvaluator(); + s = wb.getSheetAt(0); + row = s.getRow(0); + + // Check read ok, and re-evaluate fine + cell = row.getCell(5); + assertEquals("ab", cell.getStringCellValue()); + ev.evaluateFormulaCell(cell); + assertEquals("ab", cell.getStringCellValue()); + + cell = row.getCell(6); + assertEquals("empty", cell.getStringCellValue()); + ev.evaluateFormulaCell(cell); + assertEquals("empty", cell.getStringCellValue()); + + cell = row.getCell(7); + assertEquals("ab", cell.getStringCellValue()); + ev.evaluateFormulaCell(cell); + assertEquals("ab", cell.getStringCellValue()); } } |