diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-03 14:50:41 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-03 14:50:41 +0000 |
commit | 2b646f37be2d1673f77d3b01d1ec3c356c8702b7 (patch) | |
tree | bcde6a7dc10ee3955ef09ed5b12efd8e2a15a556 | |
parent | 14656c49515dbdcc3c8130d1a1a46d47dff97dbf (diff) | |
download | poi-2b646f37be2d1673f77d3b01d1ec3c356c8702b7.tar.gz poi-2b646f37be2d1673f77d3b01d1ec3c356c8702b7.zip |
[bug-62857] support locale
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897727 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java index 6f86b131cd..cd6071bad7 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNumericFunction.java @@ -115,4 +115,18 @@ final class TestNumericFunction { LocaleUtil.setUserLocale(defaultLocale); } } + + @Test + void testDOLLARDenmark() { + Locale defaultLocale = LocaleUtil.getUserLocale(); + try { + LocaleUtil.setUserLocale(new Locale("da", "DK")); + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFCell cell = wb.createSheet().createRow(0).createCell(0); + HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); + assertString(fe, cell, "DOLLAR(1234.567,2)", "kr.1,234.57"); + } finally { + LocaleUtil.setUserLocale(defaultLocale); + } + } } |