]> source.dussan.org Git - poi.git/commitdiff
[bug-62857] support locale
authorPJ Fanning <fanningpj@apache.org>
Thu, 3 Feb 2022 13:05:40 +0000 (13:05 +0000)
committerPJ Fanning <fanningpj@apache.org>
Thu, 3 Feb 2022 13:05:40 +0000 (13:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897725 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
poi/src/test/java/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java

index c471832703bcc911ca30759f71327c564d78c2a6..bb7df1b28759755b124b2c0053dcefd82e4623ce 100644 (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);
index fc8d0b98afe8c484b005fe6902b7cfc8ce205349..4c22725b1e7bcca732709638ff5823d689ee7aaf 100644 (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);