From 02a7002bd09fd047f1084e22adbfc554d044a339 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 30 May 2022 10:33:59 +0000 Subject: [PATCH] add lowercase tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901408 13f79535-47bb-0310-9956-ffa450edef68 --- .../ss/formula/atp/TestXMatchFunction.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestXMatchFunction.java b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestXMatchFunction.java index 61e089bc78..31388943aa 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/atp/TestXMatchFunction.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/atp/TestXMatchFunction.java @@ -44,6 +44,15 @@ public class TestXMatchFunction { } } + @Test + void testMicrosoftExample0Lowercase() throws IOException { + try (HSSFWorkbook wb = initNumWorkbook("grape")) { + HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); + HSSFCell cell = wb.getSheetAt(0).getRow(2).createCell(5); + assertDouble(fe, cell, "XMATCH(E3,C3:C7)", 2); + } + } + @Test void testMicrosoftExample1() throws IOException { try (HSSFWorkbook wb = initNumWorkbook("Gra?")) { @@ -57,6 +66,16 @@ public class TestXMatchFunction { } } + @Test + void testMicrosoftExample1Lowercase() throws IOException { + try (HSSFWorkbook wb = initNumWorkbook("gra?")) { + HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); + HSSFCell cell = wb.getSheetAt(0).getRow(2).createCell(5); + assertDouble(fe, cell, "XMATCH(E3,C3:C7,1)", 2); + assertDouble(fe, cell, "XMATCH(E3,C3:C7,-1)", 5); + } + } + @Test void testMicrosoftExample2() throws IOException { //the result in this example is correct but the description seems wrong from my testing -- 2.39.5