diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/librelogo/run.py | 2 | ||||
-rw-r--r-- | sw/qa/uitest/table/tableToText.py | 6 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests6/tdf125104.py | 20 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests6/tdf126017.py | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/sw/qa/uitest/librelogo/run.py b/sw/qa/uitest/librelogo/run.py index 5d64e1bea152..7b243f00b952 100644 --- a/sw/qa/uitest/librelogo/run.py +++ b/sw/qa/uitest/librelogo/run.py @@ -64,7 +64,7 @@ class LibreLogoTest(UITestCase): self.logo("__translate__") # a) check expansion of abbreviated commands : fd -> FORWARD, rt -> RIGHT, # b) check line breaking (fix for tdf#100941: new line instead of the text "\" and "n") - self.assertEqual(document.Text.String, "\nFORWARD 100 RIGHT 45 FORWARD 100") + self.assertEqual(document.Text.String.replace('\r\n', '\n'), "\nFORWARD 100 RIGHT 45 FORWARD 100") # c) check usage of real paragraphs instead of line break (tdf#120422) # first paragraph is empty (for working page break) self.assertEqual(document.Text.createEnumeration().nextElement().String, "") diff --git a/sw/qa/uitest/table/tableToText.py b/sw/qa/uitest/table/tableToText.py index 5985519f8088..f47eeeef2d52 100644 --- a/sw/qa/uitest/table/tableToText.py +++ b/sw/qa/uitest/table/tableToText.py @@ -46,7 +46,7 @@ class tableToText(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(document.Text.String[0:4], "a\na\n") + self.assertEqual(document.Text.String.replace('\r\n', '\n')[0:4], "a\na\n") self.assertEqual(document.TextTables.getCount(), 0) #undo self.xUITest.executeCommand(".uno:Undo") @@ -60,7 +60,7 @@ class tableToText(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(document.Text.String[0:6], "a;a\n;\n") + self.assertEqual(document.Text.String.replace('\r\n', '\n')[0:6], "a;a\n;\n") self.assertEqual(document.TextTables.getCount(), 0) #undo self.xUITest.executeCommand(".uno:Undo") @@ -78,7 +78,7 @@ class tableToText(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(document.Text.String[0:6], "a:a\n:\n") + self.assertEqual(document.Text.String.replace('\r\n', '\n')[0:6], "a:a\n:\n") self.assertEqual(document.TextTables.getCount(), 0) #undo self.xUITest.executeCommand(".uno:Undo") diff --git a/sw/qa/uitest/writer_tests6/tdf125104.py b/sw/qa/uitest/writer_tests6/tdf125104.py index cf38208c0fd8..b711b01caefe 100644 --- a/sw/qa/uitest/writer_tests6/tdf125104.py +++ b/sw/qa/uitest/writer_tests6/tdf125104.py @@ -33,13 +33,15 @@ class tdf125104(UITestCase): self.xUITest.executeCommand(".uno:InsertPageNumberField") self.xUITest.executeCommand(".uno:InsertPagebreak") self.xUITest.executeCommand(".uno:InsertPageNumberField") - self.assertEqual(document.Text.String[0:1], "1") - self.assertEqual(document.Text.String[2:3], "2") + text = document.Text.String.replace('\r\n', '\n') + self.assertEqual(text[0:1], "1") + self.assertEqual(text[2:3], "2") # Bug 125104 - Changing page numbering to "1st, 2nd, 3rd,..." causes crashes when trying to change Page settings later self.set_combo_layout_format(self.open_page_style_dialog(), "1st, 2nd, 3rd, ...") - self.assertEqual(document.Text.String[0:3], "1st") - self.assertEqual(document.Text.String[4:7], "2nd") + text = document.Text.String.replace('\r\n', '\n') + self.assertEqual(text[0:3], "1st") + self.assertEqual(text[4:7], "2nd") xDialog = self.open_page_style_dialog() comboLayoutFormat = xDialog.getChild("comboLayoutFormat") @@ -49,13 +51,15 @@ class tdf125104(UITestCase): # change to devanagari alphabet format self.set_combo_layout_format(self.open_page_style_dialog(), "क, ख, ग, ...") - self.assertEqual(document.Text.String[0:1], "क") - self.assertEqual(document.Text.String[2:3], "ख") + text = document.Text.String.replace('\r\n', '\n') + self.assertEqual(text[0:1], "क") + self.assertEqual(text[2:3], "ख") # change to devanagari number format self.set_combo_layout_format(self.open_page_style_dialog(), "१, २, ३, ...") - self.assertEqual(document.Text.String[0:1], "१") - self.assertEqual(document.Text.String[2:3], "२") + text = document.Text.String.replace('\r\n', '\n') + self.assertEqual(text[0:1], "१") + self.assertEqual(text[2:3], "२") self.ui_test.close_doc() diff --git a/sw/qa/uitest/writer_tests6/tdf126017.py b/sw/qa/uitest/writer_tests6/tdf126017.py index 1395e00b67ae..99ca14759e5f 100644 --- a/sw/qa/uitest/writer_tests6/tdf126017.py +++ b/sw/qa/uitest/writer_tests6/tdf126017.py @@ -55,7 +55,7 @@ class tdf126017(UITestCase): self.xUITest.executeCommand(".uno:Undo") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(document.Text.String[1:7], "CRASHY") + self.assertEqual(document.Text.String.replace('\r\n', '\n')[1:7], "CRASHY") self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: |