tdf#114820: sc_uicalc: Add unittest

Change-Id: I6aa50bdaf6a8d796d1aee817b7a1c0fddce26030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132060
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 bfb1e2b..84c8b20 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -308,6 +308,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf115162)
    // - Expected: 30
    // - Actual  : Err:504
    CPPUNIT_ASSERT_EQUAL(OUString("30"), pDoc->GetString(ScAddress(0, 0, 0)));

    aFormula = "=VLOOKUP('" + aTempFile.GetURL() + "'#$Sheet1.A2;'" + aTempFile.GetURL()
               + "'#$Sheet1.A2:B4,2,0)";
    insertStringToCell(*pModelObj, "B1", aFormula.toUtf8().getStr());

    // tdf#114820: Without the fix in place, this test would have failed with
    // - Expected: 1
    // - Actual  : Err:504
    CPPUNIT_ASSERT_EQUAL(OUString("1"), pDoc->GetString(ScAddress(1, 0, 0)));
}

CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf103994)