diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-13 20:18:36 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-13 20:36:27 -0500 |
commit | fffc6971783be55dff51e07f1d5e33866f607197 (patch) | |
tree | 00bca046bb5fbcb0314458242301d45b25f54dbf | |
parent | 888851bdd7498558af1a74f7e982ad1455ef3a35 (diff) |
fdo#72348: Add test to catch this.
Change-Id: I068cf19204d3091ebc59ee6be4e1a977bf237a04
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 608b81fc608d..02dfff22bdb0 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -2514,6 +2514,24 @@ void Test::testFuncMATCH() clearRange(m_pDoc, ScRange(0, 0, 0, 40, 4, 0)); } + { + // search range contains leading and trailing empty cell ranges. + + clearRange(m_pDoc, ScRange(0,0,0,2,100,0)); + + // A5:A8 contains sorted values. + m_pDoc->SetValue(ScAddress(0,4,0), 1.0); + m_pDoc->SetValue(ScAddress(0,5,0), 2.0); + m_pDoc->SetValue(ScAddress(0,6,0), 3.0); + m_pDoc->SetValue(ScAddress(0,7,0), 4.0); + + // Find value 2 which is in A6. + m_pDoc->SetString(ScAddress(1,0,0), "=MATCH(2;A1:A20)"); + m_pDoc->CalcAll(); + + CPPUNIT_ASSERT_EQUAL(OUString("6"), m_pDoc->GetString(ScAddress(1,0,0))); + } + m_pDoc->DeleteTab(0); } |