summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-29 05:10:47 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-29 05:10:47 (GMT)
commit469742b86e6e88f70f5a6a1b709b9d0ea73d8bce (patch)
treef950096f6d5e37840cd7f46a5e7107430c657005
parent2130dfbcca036e9e0d467aaca9b89ce455075661 (diff)
Add more autocorrection
-rw-r--r--messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp b/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
index e45a370..1c83819 100644
--- a/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
+++ b/messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
@@ -81,7 +81,8 @@ void RichTextComposerNgTest::shouldForceAutoCorrectionWithSelection_data()
QTest::newRow("noselection2") << QStringLiteral("\nboo bla bli.\nfoo faa") << QStringLiteral("\nBoo bla bli.\nFoo faa") << 1 << 1;
QTest::newRow("fullselection") << QStringLiteral("\nboo bla bli.\nfoo faa") << QStringLiteral("\nBoo bla bli.\nFoo faa") << 0 << 22;
QTest::newRow("selection1") << QStringLiteral("\nboo bla bli.\nfoo faa") << QStringLiteral("\nBoo bla bli.\nfoo faa") << 0 << 10;
- QTest::newRow("selection1") << QStringLiteral("\nboo bla bli.\nfoo faa") << QStringLiteral("\nboo bla bli.\nfoo faa") << 5 << 10;
+ QTest::newRow("selection2") << QStringLiteral("\nboo bla bli.\nfoo faa") << QStringLiteral("\nboo bla bli.\nfoo faa") << 5 << 10;
+ QTest::newRow("twouppercase") << QStringLiteral("\nBOo bla bli.\nfoo FAa") << QStringLiteral("\nBoo bla bli.\nFoo Faa") << 0 << 22;
}
void RichTextComposerNgTest::shouldForceAutoCorrectionWithSelection()
@@ -101,6 +102,7 @@ void RichTextComposerNgTest::shouldForceAutoCorrectionWithSelection()
PimCommon::AutoCorrection autocorrection;
autocorrection.setEnabledAutoCorrection(true);
autocorrection.setUppercaseFirstCharOfSentence(true);
+ autocorrection.setFixTwoUppercaseChars(true);
richtextComposerNg.setAutocorrection(&autocorrection);
richtextComposerNg.forceAutoCorrection(true);