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 <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index a306663..9477fd1 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"));