diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-27 13:18:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-27 21:58:07 +0100 |
commit | 03567d1156d4e61910912c89124b6da94a577c22 (patch) | |
tree | 50cdb71c9e3915180a0c605c66cfc583c7ac15bc /editeng/qa/unit/core-test.cxx | |
parent | 6160ac241b1f54ddb2b2b444da14fe31878a5bc7 (diff) |
rhbz#1517407 Capitalize every word doesn't work after brackets
Change-Id: Iab2da3f74f6116bb1b9855044df2a2ece977bb95
Reviewed-on: https://gerrit.libreoffice.org/45335
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/qa/unit/core-test.cxx')
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 8becb860cc0b..c23e94a0f60f 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -89,6 +89,8 @@ public: void testLargeParaCopyPaste(); + void testTransliterate(); + DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void ); CPPUNIT_TEST_SUITE(Test); @@ -107,6 +109,7 @@ public: CPPUNIT_TEST(testParaStartCopyPaste); CPPUNIT_TEST(testSectionAttributes); CPPUNIT_TEST(testLargeParaCopyPaste); + CPPUNIT_TEST(testTransliterate); CPPUNIT_TEST_SUITE_END(); private: @@ -1741,6 +1744,18 @@ void Test::testLargeParaCopyPaste() CPPUNIT_ASSERT_EQUAL( aTenthPara, rDoc.GetParaAsString(sal_Int32(11)) ); } +void Test::testTransliterate() +{ + // Create EditEngine's instance + EditEngine aEditEngine( mpItemPool ); + + OUString sText("one (two) three"); + aEditEngine.SetText(sText); + aEditEngine.TransliterateText(ESelection(0, 0, 0, sText.getLength()), TransliterationFlags::TITLE_CASE); + OUString aExpected("One (Two) Three"); + CPPUNIT_ASSERT_EQUAL(aExpected, aEditEngine.GetText()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); } |