aboutsummaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-12-06 12:02:24 +0000
committerPJ Fanning <fanningpj@apache.org>2021-12-06 12:02:24 +0000
commite52e874d28aedf68a39098dfa8964749f126ab36 (patch)
treee218e7f0ab4ed5a4b420cefb766eb5cf6afc10f0 /poi
parent399280c79e884a10dbc833a057d32efa4293edcb (diff)
downloadpoi-e52e874d28aedf68a39098dfa8964749f126ab36.tar.gz
poi-e52e874d28aedf68a39098dfa8964749f126ab36.zip
add xmatch test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895619 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/test/java/org/apache/poi/ss/formula/atp/TestXMatchFunction.java10
1 files changed, 10 insertions, 0 deletions
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 a9656e4070..e656d2782d 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
@@ -72,6 +72,16 @@ public class TestXMatchFunction {
}
}
+ @Test
+ void testMicrosoftExample4() throws IOException {
+ try (HSSFWorkbook wb = new HSSFWorkbook()) {
+ HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
+ HSSFCell cell = wb.createSheet().createRow(0).createCell(0);
+ assertDouble(fe, cell, "XMATCH(4,{5,4,3,2,1})", 2);
+ assertDouble(fe, cell, "XMATCH(4.5,{5,4,3,2,1},1)", 1);
+ }
+ }
+
private HSSFWorkbook initNumWorkbook(String lookup) {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();