sc/qa/unit/uicalc/uicalc.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+)
New commits: commit 30334be31f190b5da79f3ba2bec94b2ff35ad72c Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 2 12:21:01 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 2 16:12:45 2023 +0200 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 <xiscofa...@libreoffice.org> 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();