summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-06-03 16:44:02 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-03 19:32:23 +0200
commitb72c0abac105d2c921e3e5d3e36d5cf2e5ccdbb2 (patch)
tree6d5640e38afd96ab6cc68786d7d51373766eae43 /sc
parent5a6b4b4f288621772991269180aa3a2cffff01af (diff)
tdf#149378: sc_uicalc: Add unittest
Change-Id: Ie92b22ce664d667892e864598158618a0ee4ae6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135362 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 6b8a312a7bd9..863221f090ff 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -2950,6 +2950,22 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf99386)
CPPUNIT_ASSERT_EQUAL(OUString("This"), pDoc->GetString(ScAddress(1, 1, 0)));
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149378)
+{
+ mxComponent = loadFromDesktop("private:factory/scalc");
+ ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
+ CPPUNIT_ASSERT(pModelObj);
+ ScDocument* pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ insertStringToCell(*pModelObj, "A1", "=MINVERSE(A1:C3)");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: {=MINVERSE(A1:C3)}
+ // - Actual : =MINVERSE(A1:C3)
+ CPPUNIT_ASSERT_EQUAL(OUString("{=MINVERSE(A1:C3)}"), pDoc->GetFormula(0, 0, 0));
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126926)
{
mxComponent = loadFromDesktop("private:factory/scalc");