mirror of https://github.com/apache/poi.git
[bug-62216] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1828174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fb333194d
commit
56717351c1
|
@ -28,6 +28,7 @@ import javax.xml.namespace.QName;
|
||||||
|
|
||||||
import org.apache.poi.ss.usermodel.BaseTestXCell;
|
import org.apache.poi.ss.usermodel.BaseTestXCell;
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.FormulaError;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.xssf.SXSSFITestDataProvider;
|
import org.apache.poi.xssf.SXSSFITestDataProvider;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFCell;
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
||||||
|
@ -61,7 +62,7 @@ public class TestSXSSFCell extends BaseTestXCell {
|
||||||
"\nPOI",
|
"\nPOI",
|
||||||
"\n\nPOI \n",
|
"\n\nPOI \n",
|
||||||
};
|
};
|
||||||
for(String str : samplesWithSpaces){
|
for (String str : samplesWithSpaces) {
|
||||||
Workbook swb = _testDataProvider.createWorkbook();
|
Workbook swb = _testDataProvider.createWorkbook();
|
||||||
Cell sCell = swb.createSheet().createRow(0).createCell(0);
|
Cell sCell = swb.createSheet().createRow(0).createCell(0);
|
||||||
sCell.setCellValue(str);
|
sCell.setCellValue(str);
|
||||||
|
@ -82,4 +83,16 @@ public class TestSXSSFCell extends BaseTestXCell {
|
||||||
swb.close();
|
swb.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test62216() throws IOException {
|
||||||
|
try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
|
||||||
|
Cell instance = wb.createSheet().createRow(0).createCell(0);
|
||||||
|
String formula = "2";
|
||||||
|
instance.setCellFormula(formula);
|
||||||
|
instance.setCellErrorValue(FormulaError.NAME.getCode());
|
||||||
|
|
||||||
|
assertEquals(formula, instance.getCellFormula());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue