summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-05-02 12:21:01 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-05-02 16:12:45 +0200
commit30334be31f190b5da79f3ba2bec94b2ff35ad72c (patch)
treecbc80e5bf5ca4a40432f8ecb7aa82af26ecf4f8e /sc
parent751cb2cf874a2d017cae699a7983e4419dcbe6f6 (diff)
tdf#119659: sc_uicalc: Add unittest
Change-Id: I9c1851d4c0520345d632ceef202f9991d2e6d359 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151262 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 0d3920edbab9..e88c8d25158d 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1667,6 +1667,19 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink)
WEIGHT_NORMAL, aFont.GetWeight());
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119659)
+{
+ createScDoc();
+ ScDocument* pDoc = getScDoc();
+
+ insertArrayToCell("A1:C1", u"={1;2;3}");
+
+ insertStringToCell("A2", u"=LOOKUP(3; A1:C1; {1,2})");
+
+ // Without the fix in place, this test would have crashed here
+ CPPUNIT_ASSERT_EQUAL(OUString("#N/A"), pDoc->GetString(ScAddress(0, 1, 0)));
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131442)
{
createScDoc();