diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-01 14:38:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-01 14:49:03 +0100 |
commit | 6752590fec030067bde038ee6c28cff05f972eac (patch) | |
tree | f7827b7a60693d25ce4ff959916037ad9f98c798 /editeng/qa | |
parent | 4760c44c80e6dece5fe1a2e170b0f69c500a9681 (diff) |
don't autocapitalize words that follow a field mark
Change-Id: Ia8efa88aaf47edba9a590c858d0ea30d7bfe2977
Diffstat (limited to 'editeng/qa')
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index d303805f0a0c..14f06fe3293e 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -340,6 +340,28 @@ void Test::testAutocorrect() CPPUNIT_ASSERT_EQUAL(sExpected, aFoo.getResult()); } + + { + OUString sInput("Test. test"); + sal_Unicode cNextChar(' '); + OUString sExpected("Test. Test "); + + TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US); + aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true); + + CPPUNIT_ASSERT_MESSAGE("autocorrect", aFoo.getResult() == sExpected); + } + + { + OUString sInput("Test. \x01 test"); + sal_Unicode cNextChar(' '); + OUString sExpected("Test. \x01 test "); + + TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US); + aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true); + + CPPUNIT_ASSERT_MESSAGE("autocorrect", aFoo.getResult() == sExpected); + } } namespace { |