sw/qa/extras/uiwriter/uiwriter.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit 7cef2f69f8553380e77ab0efab4018a010e3d9cd Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Dec 10 17:37:32 2020 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Dec 10 21:28:37 2020 +0100 tdf#81226: sw_uiwriter: Add unittest Change-Id: If5f6ae5822b7af9618b447dc60180ffe3f9f04b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107569 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index b699c2cd10ae..461b971afaf8 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -213,6 +213,7 @@ public: void testCreatePortions(); void testBookmarkUndo(); void testFdo85876(); + void testTdf81226(); void testTdf79717(); void testTdf137532(); void testFdo87448(); @@ -444,6 +445,7 @@ public: CPPUNIT_TEST(testCreatePortions); CPPUNIT_TEST(testBookmarkUndo); CPPUNIT_TEST(testFdo85876); + CPPUNIT_TEST(testTdf81226); CPPUNIT_TEST(testTdf79717); CPPUNIT_TEST(testTdf137532); CPPUNIT_TEST(testFdo87448); @@ -2021,6 +2023,21 @@ void SwUiWriterTest::testFdo85876() } } +void SwUiWriterTest::testTdf81226() +{ + SwDoc* const pDoc = createDoc(); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + pWrtShell->Insert("before"); + pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false); + pWrtShell->Down(false); + pWrtShell->Insert("after"); + + // Without the fix in place, this test would have failed with + // - Expected: beforeafter + // - Actual : beafterfore + CPPUNIT_ASSERT_EQUAL(OUString("beforeafter"), getParagraph(1)->getString()); +} + void SwUiWriterTest::testTdf79717() { SwDoc* const pDoc = createDoc(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits