tdf#116149: sc_uicalc: Add unittest
Change-Id: I304bbbbd21e818b90b4c4daba26448836e23bc2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132067
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 84c8b20..fc0d789 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -317,6 +317,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf115162)
// - Expected: 1
// - Actual : Err:504
CPPUNIT_ASSERT_EQUAL(OUString("1"), pDoc->GetString(ScAddress(1, 0, 0)));
aFormula
= "=VAR('" + aTempFile.GetURL() + "'#$Sheet1.C2;'" + aTempFile.GetURL() + "'#$Sheet1.C3)";
insertStringToCell(*pModelObj, "C1", aFormula.toUtf8().getStr());
// tdf#116149: Without the fix in place, this test would have failed with
// - Expected: 50
// - Actual : Err:504
CPPUNIT_ASSERT_EQUAL(OUString("50"), pDoc->GetString(ScAddress(2, 0, 0)));
}
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf103994)