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

New commits:
commit 5d875e4fbb490c2cd3bd75fa88a865333932dd97
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Jul 6 09:54:19 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Jul 6 11:42:38 2022 +0200

    tdf#149665: sc_ucalc: Add unittest
    
    Change-Id: I0273e499ee607a54cbd32296e568ad46b1c0c0ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136839
    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 d5c983190b98..8aa2fabbfebd 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -189,6 +189,7 @@ public:
     void testSetBackgroundColor();
     void testRenameTable();
 
+    void testTdf149665();
     void testTdf64001();
     void testAutoFill();
     void testAutoFillSimple();
@@ -295,6 +296,7 @@ public:
     CPPUNIT_TEST(testJumpToPrecedentsDependents);
     CPPUNIT_TEST(testSetBackgroundColor);
     CPPUNIT_TEST(testRenameTable);
+    CPPUNIT_TEST(testTdf149665);
     CPPUNIT_TEST(testTdf64001);
     CPPUNIT_TEST(testAutoFill);
     CPPUNIT_TEST(testAutoFillSimple);
@@ -4469,6 +4471,20 @@ void Test::testJumpToPrecedentsDependents()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testTdf149665()
+{
+    m_pDoc->InsertTab(0, "Test");
+
+    m_pDoc->SetString(0, 0, 0, "''1");
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: '1
+    // - Actual  : ''1
+    CPPUNIT_ASSERT_EQUAL( OUString("'1"), m_pDoc->GetString( 0, 0, 0 ) );
+
+    m_pDoc->DeleteTab(0);
+}
+
 void Test::testTdf64001()
 {
     m_pDoc->InsertTab(0, "test");

Reply via email to