File test-word-count-punctuation.patch of Package libreoffice
diff --git a/sw/qa/uitest/writer_tests/wordCount.py b/sw/qa/uitest/writer_tests/wordCount.py
index 06d62fefb88a..76a81a7788d9 100644
--- a/sw/qa/uitest/writer_tests/wordCount.py
+++ b/sw/qa/uitest/writer_tests/wordCount.py
@@ -270,4 +270,30 @@ class writerWordCount(UITestCase):
self.assertEqual(get_state_as_dict(xselectcjkchars)["Text"], "0")
self.assertEqual(get_state_as_dict(xdoccjkchars)["Text"], "0")
+ def test_word_count_puntuaction(self):
+ with self.ui_test.create_doc_in_start_center("writer"):
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ type_text(xWriterEdit, "a. b. c.") #type text
+ xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "4"})) #select two words
+ with self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog", close_button="close") as xDialog:
+
+ xselectwords = xDialog.getChild("selectwords")
+ xdocwords = xDialog.getChild("docwords")
+ xselectchars = xDialog.getChild("selectchars")
+ xdocchars = xDialog.getChild("docchars")
+ xselectcharsnospaces = xDialog.getChild("selectcharsnospaces")
+ xdoccharsnospaces = xDialog.getChild("doccharsnospaces")
+ xselectcjkchars = xDialog.getChild("selectcjkchars")
+ xdoccjkchars = xDialog.getChild("doccjkchars")
+
+ self.assertEqual(get_state_as_dict(xselectwords)["Text"], "2")
+ self.assertEqual(get_state_as_dict(xdocwords)["Text"], "3")
+ self.assertEqual(get_state_as_dict(xselectchars)["Text"], "4")
+ self.assertEqual(get_state_as_dict(xdocchars)["Text"], "8")
+ self.assertEqual(get_state_as_dict(xselectcharsnospaces)["Text"], "3")
+ self.assertEqual(get_state_as_dict(xdoccharsnospaces)["Text"], "6")
+ self.assertEqual(get_state_as_dict(xselectcjkchars)["Text"], "0")
+ self.assertEqual(get_state_as_dict(xdoccjkchars)["Text"], "0")
# vim: set shiftwidth=4 softtabstop=4 expandtab: