From: PJ Fanning Date: Thu, 3 Feb 2022 13:05:40 +0000 (+0000) Subject: [bug-62857] support locale X-Git-Tag: REL_5_2_1~114 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14656c49515dbdcc3c8130d1a1a46d47dff97dbf;p=poi.git [bug-62857] support locale git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897725 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java index c471832703..bb7df1b287 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java @@ -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); diff --git a/poi/src/test/java/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java b/poi/src/test/java/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java index fc8d0b98af..4c22725b1e 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java @@ -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);