diff options
author | Eike Rathke <erack@redhat.com> | 2018-08-24 09:55:29 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-08-24 11:45:52 +0200 |
commit | 4f35cb303583a66de3b5df548bcad9c24f126f34 (patch) | |
tree | 25c791f77765958dc95305a81745a9332b0f3bd9 /sc | |
parent | 3c91b6362eab14a631577ca9a0caa7610fe3725a (diff) |
tdf#117016 unit test for LOOKUP() interim array omitted errors
Change-Id: I764e39876dd0a870cbe88054311899f0cc2a3181
Reviewed-on: https://gerrit.libreoffice.org/59541
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 5be2404d484f..342ef56f2ce1 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -5135,6 +5135,16 @@ void Test::testFuncLOOKUParrayWithError() m_pDoc->SetString(4,1,0, ""); // E2 CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find match for second last column.", OUString("b"), m_pDoc->GetString(0,0,0)); + m_pDoc->SetString(6,1,0, "one"); // G2 + m_pDoc->SetString(6,5,0, "two"); // G6 + // Creates an interim array {1,#DIV/0!,#DIV/0!,#DIV/0!,1,#DIV/0!,#DIV/0!,#DIV/0!} + m_pDoc->SetString(7,8,0, "=LOOKUP(2;1/(NOT(ISBLANK(G2:G9)));G2:G9)"); // H9 + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find match for last row.", OUString("two"), m_pDoc->GetString(7,8,0)); + + // Lookup on empty range. + m_pDoc->SetString(9,8,0, "=LOOKUP(2;1/(NOT(ISBLANK(I2:I9)));I2:I9)"); // J9 + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find no match.", OUString("#N/A"), m_pDoc->GetString(9,8,0)); + m_pDoc->DeleteTab(0); } |