sc/qa/unit/uicalc/uicalc.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 25ae332bbafd0cb416a6a5c0db467e501661c679
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Mar 13 14:40:12 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Mar 13 16:06:01 2023 +0000

    tdf#154125: sc_uicalc: Add unittest
    
    Change-Id: I85a87d9c7f23f6e2c914542a328174cca02d3491
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148790
    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 7cc12ea150a0..421f96410e6f 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -941,6 +941,21 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf145085)
     CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf154125)
+{
+    createScDoc();
+    ScDocument* pDoc = getScDoc();
+
+    insertArrayToCell("A1", u"=INDEX({11;21},0,1)");
+
+    CPPUNIT_ASSERT_EQUAL(OUString("11"), pDoc->GetString(ScAddress(0, 0, 0)));
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 21
+    // - Actual  :
+    CPPUNIT_ASSERT_EQUAL(OUString("21"), pDoc->GetString(ScAddress(0, 1, 0)));
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf148863)
 {
     createScDoc();

Reply via email to