summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2016-08-22 18:21:05 +0200
committerRobert Loehning <robert.loehning@qt.io>2016-08-30 09:41:08 +0000
commit96a9b2bb5b6ecb66eade04115f58b0ee55921523 (patch)
treea02686417f5a2cb2e0a4774578dd817081f71410 /tests
parent1074b081764cd2b55182322914c3489cf385667d (diff)
downloadqt-creator-96a9b2bb5b6ecb66eade04115f58b0ee55921523.tar.gz
Squish: Strip final newline from expected text
Change-Id: Icc10f3f0efad5a5d803f556037ecbc08fb6503f1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/suite_tools/tst_codepasting/test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py
index e05ebe2603..5a5c16dfa5 100644
--- a/tests/system/suite_tools/tst_codepasting/test.py
+++ b/tests/system/suite_tools/tst_codepasting/test.py
@@ -58,7 +58,7 @@ def main():
description = "Description %s" % datetime.utcnow()
type(waitForObject(":uiDescription_QLineEdit"), description)
typeLines(pasteEditor, "// tst_codepasting %s" % datetime.utcnow())
- pastedText = pasteEditor.plainText
+ pastedText = str(pasteEditor.plainText)
expiry = waitForObject(":Send to Codepaster.qt_spinbox_lineedit_QLineEdit")
expiryDays = random.randint(1, 10)
replaceEditorContent(expiry, "%d" % expiryDays)
@@ -134,6 +134,8 @@ def main():
waitFor("not filenameCombo.currentText.isEmpty()", 20000)
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
test.compare(filenameCombo.currentText, "%s: %s" % (protocol, pasteId), "Verify title of editor")
+ if protocol == "Pastebin.Com" and pastedText.endswith("\n"):
+ pastedText = pastedText[:-1]
test.compare(editor.plainText, pastedText, "Verify that pasted and fetched texts are the same")
invokeMenuItem("File", "Close All")
invokeMenuItem("File", "Open File or Project...")