diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-02-21 15:49:56 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-04-30 13:07:24 +0200 |
commit | e39d7978dd8b28c09b3994442145deee916f79e1 (patch) | |
tree | 95dafdf9b559d075f2abff35bf530c534ed3cbfc | |
parent | 1b6310ef575e349d30a0f6bbfa888af31f87539d (diff) |
tdf#159797: sw_uiwriter6: Add unittest
Change-Id: I69b8ea673f676f1106e257cef507937cbd5ebd2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163695
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter6.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 5b4140e02967..c76dd01d3d3d 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -3008,6 +3008,19 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf106663HeaderTextFrameGoToNextPlacem CPPUNIT_ASSERT(pCursor->GetPoint()->GetNode().GetTextNode()->GetText().startsWith("Heading")); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf159797) +{ + createSwDoc(); + SwXTextDocument& rTextDoc = dynamic_cast<SwXTextDocument&>(*mxComponent); + + emulateTyping(rTextDoc, u"This - is replaced. - But this is not replaced."); + // Without the fix in place, this would fail with + // - Expected: This – is replaced. – But this is not replaced. + // - Actual : This – is replaced. - But this is not replaced. + CPPUNIT_ASSERT_EQUAL(u"This – is replaced. – But this is not replaced."_ustr, + getParagraph(1)->getString()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf155407) { createSwDoc(); |