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

New commits:
commit 97d53be544fc32f1da294dde133195c5b10588e9
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Mar 24 11:54:39 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Mar 24 17:16:05 2022 +0100

    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 <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 84c8b208deb1..fc0d7895b32f 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)

Reply via email to