diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-12-19 20:02:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-12-20 08:28:36 +0100 |
commit | ea1a05e43e002444d224fa47e87fc79f921ae10b (patch) | |
tree | dd6f171c547c4b5419b4e4b458c0b05eb6c4703f | |
parent | b64f23b235d6fd7c9f6197da0f5f0432fede4294 (diff) |
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 <vmiklos@collabora.com>
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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") |