Unit test to tdf159797
checks replacement of dash to endash after sentence
Change-Id: I61843825faaf212eb5560797f1b6a2fdad5efce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164086
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/sw/qa/uitest/data/tdf159797.odt b/sw/qa/uitest/data/tdf159797.odt
new file mode 100755
index 0000000..437b6fc0c
--- /dev/null
+++ b/sw/qa/uitest/data/tdf159797.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests8/tdf159797.py b/sw/qa/uitest/writer_tests8/tdf159797.py
new file mode 100644
index 0000000..a29a1f5
--- /dev/null
+++ b/sw/qa/uitest/writer_tests8/tdf159797.py
@@ -0,0 +1,29 @@
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_url_for_data_file
from libreoffice.uno.propertyvalue import mkPropertyValues
from com.sun.star.text.TextContentAnchorType import AT_PAGE, AT_PARAGRAPH
class tdf159797(UITestCase):
def test_tdf159797(self):
with self.ui_test.load_file(get_url_for_data_file("tdf159797.odt")) as document:
xWriterDoc = self.xUITest.getTopFocusWindow()
xWriterEdit = xWriterDoc.getChild("writer_edit")
xWriterEdit.executeAction("CLICK", mkPropertyValues({"START_POS": "26", "END_POS": "26"}))
xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": " "}))
xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "31"}))
windowState = xWriterEdit.getState();
self.assertEqual(windowState[14].Value, "This is a sentence. \u2013 Here")
# vim: set shiftwidth=4 softtabstop=4 expandtab: