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

New commits:
commit c2a4a7a94887b5ea24e9ba7cfa062842a89e1b4e
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Jun 3 20:39:44 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Jun 3 23:09:00 2022 +0200

    tdf#149378: sc_uicalc: Add unittest, follow-up
    
    This commit also tests
    
    - 6079bf6879c4baf144b68ef459d825412ecea697
    "Add binary operators to ForceArrayReturn handling, tdf#149378
    follow-up"
    
    - a15ce15709acee3b46fb9f7d6836c57f6e1ef9a7
    "Propagate ForceArrayReturn only for Value parameters, tdf#149378
    follow-up"
    
    - bac202275b1bf1abe4277daf35f74ff973c23483
    "Propagate inline array only for Value parameters, tdf#149378 follow-up"
    
    based on their commit description
    
    Change-Id: Ie69868460ae87a67b31e0bd30a66644e89ea60ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135368
    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 863221f090ff..32981fb3a0fe 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -2964,6 +2964,30 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149378)
     // - Expected: {=MINVERSE(A1:C3)}
     // - Actual  : =MINVERSE(A1:C3)
     CPPUNIT_ASSERT_EQUAL(OUString("{=MINVERSE(A1:C3)}"), pDoc->GetFormula(0, 
0, 0));
+
+    insertStringToCell(*pModelObj, "B1", "={1;2}");
+    CPPUNIT_ASSERT_EQUAL(OUString("{={1;2}}"), pDoc->GetFormula(1, 0, 0));
+
+    insertStringToCell(*pModelObj, "C1", "={1;2}+3");
+    CPPUNIT_ASSERT_EQUAL(OUString("{={1;2}+3}"), pDoc->GetFormula(2, 0, 0));
+
+    insertStringToCell(*pModelObj, "D1", "={1;2}+{3;4}");
+    CPPUNIT_ASSERT_EQUAL(OUString("{={1;2}+{3;4}}"), pDoc->GetFormula(3, 0, 
0));
+
+    insertStringToCell(*pModelObj, "E1", "={1;2}+A1");
+    CPPUNIT_ASSERT_EQUAL(OUString("{={1;2}+A1}"), pDoc->GetFormula(4, 0, 0));
+
+    insertStringToCell(*pModelObj, "F1", "={1;2}+A1:A2");
+    CPPUNIT_ASSERT_EQUAL(OUString("={1;2}+A1:A2"), pDoc->GetFormula(5, 0, 0));
+
+    insertStringToCell(*pModelObj, "G1", "=SUM(MUNIT(3))");
+    CPPUNIT_ASSERT_EQUAL(OUString("=SUM(MUNIT(3))"), pDoc->GetFormula(6, 0, 
0));
+
+    insertStringToCell(*pModelObj, "H1", "=SUM({1;2})");
+    CPPUNIT_ASSERT_EQUAL(OUString("=SUM({1;2})"), pDoc->GetFormula(7, 0, 0));
+
+    insertStringToCell(*pModelObj, "I1", "=ABS({-1;-2})");
+    CPPUNIT_ASSERT_EQUAL(OUString("{=ABS({-1;-2})}"), pDoc->GetFormula(8, 0, 
0));
 }
 
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126926)

Reply via email to