diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-07-06 09:54:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-07-06 11:42:38 +0200 |
commit | 5d875e4fbb490c2cd3bd75fa88a865333932dd97 (patch) | |
tree | e7179764553ac356e9e0697b70f6de14f407ec1a /sc | |
parent | 170a2b9da7848b66d93e10aed29f7f5ac2c8ebca (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
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"); |