sw/qa/extras/rtfexport/rtfexport.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit ea1a05e43e002444d224fa47e87fc79f921ae10b
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Dec 19 20:02:07 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Dec 20 08:28:36 2023 +0100

    CppunitTest_sw_rtfexport: avoid SwModelTestBase::getLength()
    
    Better to check the body text, not just the length.
    
    Change-Id: Id98cc408772c5d2c135bdd184d58a5eb12f1c011
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161005
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index bbb09090500e..629b32d73acd 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -55,7 +55,10 @@ DECLARE_RTFEXPORT_TEST(testZoom, "zoom.rtf")
     CPPUNIT_ASSERT_EQUAL(sal_Int16(42), nValue);
 }
 
-DECLARE_RTFEXPORT_TEST(testFdo38176, "fdo38176.rtf") { CPPUNIT_ASSERT_EQUAL(9, 
getLength()); }
+DECLARE_RTFEXPORT_TEST(testFdo38176, "fdo38176.rtf")
+{
+    CPPUNIT_ASSERT_EQUAL(u"foo ‑­bar"_ustr, getBodyText());
+}
 
 DECLARE_RTFEXPORT_TEST(testFdo49683, "fdo49683.rtf")
 {
@@ -484,7 +487,7 @@ DECLARE_RTFEXPORT_TEST(testFdo61507, "fdo61507.rtf")
     CPPUNIT_ASSERT_EQUAL(u"\u00C9\u00C1\u0150\u0170\u222D"_ustr, 
xDocumentProperties->getTitle());
 
     // Only "Hello.", no additional characters.
-    CPPUNIT_ASSERT_EQUAL(6, getLength());
+    CPPUNIT_ASSERT_EQUAL(OUString("Hello."), getBodyText());
 }
 
 DECLARE_RTFEXPORT_TEST(testFdo30983, "fdo30983.rtf")

Reply via email to