sc/qa/unit/ucalc.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 26623cc6c144c451323a08be7bd021ae354b1a95
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Mar 16 13:52:34 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Mar 16 15:58:32 2022 +0100

    tdf#93951: sc_ucalc: Add unittest
    
    Change-Id: I3aaf896e2b3b9b4f2d1421abc591b8ec94a039ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131657
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index a3066631aa47..9477fd1f10f5 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -90,6 +90,7 @@ public:
     void testInput();
     void testColumnIterator();
     void testTdf90698();
+    void testTdf93951();
     void testTdf134490();
     void testTdf135249();
     void testDocStatistics();
@@ -234,6 +235,7 @@ public:
     CPPUNIT_TEST(testInput);
     CPPUNIT_TEST(testColumnIterator);
     CPPUNIT_TEST(testTdf90698);
+    CPPUNIT_TEST(testTdf93951);
     CPPUNIT_TEST(testTdf134490);
     CPPUNIT_TEST(testTdf135249);
     CPPUNIT_TEST(testDocStatistics);
@@ -673,6 +675,21 @@ void Test::testTdf90698()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testTdf93951()
+{
+    CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
+    m_pDoc->SetString(ScAddress(0,0,0), "=2*" + OUStringChar(u'\x00A7') + 
"*2");
+
+    OUString aFormula = m_pDoc->GetFormula(0,0,0);
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: =2*ยง*2
+    // - Actual  : =2*
+    CPPUNIT_ASSERT_EQUAL(OUString("=2*" + OUStringChar(u'\x00A7') + "*2"), 
aFormula);
+
+    m_pDoc->DeleteTab(0);
+}
+
 void Test::testTdf134490()
 {
     CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));

Reply via email to