[bug-62857] support locale

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-02-03 13:05:40 +00:00
parent d8b574b325
commit 14656c4951
2 changed files with 7 additions and 1 deletions

View File

@ -170,6 +170,9 @@ public final class TestFormulaEvaluatorOnXSSF {
@ParameterizedTest
@MethodSource("data")
void processFunctionRow(String targetFunctionName, int formulasRowIdx, int expectedValuesRowIdx) {
//DOLLAR function returns a string that is locale specific
assumeFalse(targetFunctionName.equalsIgnoreCase("DOLLAR"));
Row formulasRow = sheet.getRow(formulasRowIdx);
Row expectedValuesRow = sheet.getRow(expectedValuesRowIdx);
@ -180,7 +183,6 @@ public final class TestFormulaEvaluatorOnXSSF {
Cell c = formulasRow.getCell(colnum);
assumeTrue(c != null);
assumeTrue(c.getCellType() == CellType.FORMULA);
assumeFalse(targetFunctionName.equalsIgnoreCase("DOLLAR"));
ignoredFormulaTestCase(c.getCellFormula());
CellValue actValue = evaluator.evaluate(c);

View File

@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import java.util.ArrayList;
import java.util.List;
@ -152,6 +153,9 @@ public final class TestFormulasFromSpreadsheet {
@ParameterizedTest
@MethodSource("data")
void processFunctionRow(String targetFunctionName, int formulasRowIdx, int expectedValuesRowIdx) {
//DOLLAR function returns a string that is locale specific
assumeFalse(targetFunctionName.equalsIgnoreCase("DOLLAR"));
Row formulasRow = sheet.getRow(formulasRowIdx);
Row expectedValuesRow = sheet.getRow(expectedValuesRowIdx);