summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-07-15 21:29:20 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-07-16 08:43:38 +0200
commitac03c0ed332ab0dcd319c72f46a32c76b88c4812 (patch)
tree905f232bf0cebc81e6ae295570ed76fbfcb5bd15 /sw/qa
parentf31d940b3777018f385541eed351f859a58c1989 (diff)
tdf#42893: sw_autocorrect: Add unittest
Change-Id: Ic94061b9255f058c249fd853ad4856b284f8cfa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170532 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/autocorrect/autocorrect.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/autocorrect/autocorrect.cxx b/sw/qa/extras/autocorrect/autocorrect.cxx
index 2bb2d1ff608d..877254f368fb 100644
--- a/sw/qa/extras/autocorrect/autocorrect.cxx
+++ b/sw/qa/extras/autocorrect/autocorrect.cxx
@@ -252,6 +252,19 @@ CPPUNIT_TEST_FIXTURE(SwAutoCorrect, en_US)
// - Actual : DŽ
emulateTyping(rTextDoc, u"dž ");
CPPUNIT_ASSERT_EQUAL(u"Dž "_ustr, getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
+
+ emulateTyping(rTextDoc, u"foo. bar ");
+ CPPUNIT_ASSERT_EQUAL(u"Foo. Bar "_ustr, getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
+
+ // tdf#42893: Without the fix in place, this test would have failed with
+ // - Expected: F.o.o. bar
+ // - Actual : F.o.o. Bar
+ emulateTyping(rTextDoc, u"F.o.o. bar ");
+ CPPUNIT_ASSERT_EQUAL(u"F.o.o. bar "_ustr, getParagraph(1)->getString());
}
CPPUNIT_TEST_FIXTURE(SwAutoCorrect, hu_HU)