forked from qt-creator/qt-creator
Squish: Be fuzzy when comparing snippet fetched from Pastebin.Com
Change-Id: If08b2b9136d55e2dddca6181c1075d845422a30b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Christian Stenger
parent
a1eb505fbd
commit
f529051b58
@@ -239,9 +239,16 @@ def main():
|
||||
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
|
||||
continue
|
||||
test.compare(filenameCombo.currentText, "%s: %s" % (protocol, pasteId), "Verify title of editor")
|
||||
if protocol in (NAME_DPCOM, NAME_PBCOM) and pastedText.endswith("\n"):
|
||||
pastedText = pastedText[:-1]
|
||||
test.compare(editor.plainText, pastedText, "Verify that pasted and fetched texts are the same")
|
||||
if protocol in (NAME_PBCOM):
|
||||
test.verify(abs(len(str(editor.plainText)) - len(pastedText)) < 2,
|
||||
"Verify that pasted and fetched texts have similar length")
|
||||
test.compare(str(editor.plainText).rstrip(), pastedText.rstrip(),
|
||||
"Verify that pasted and fetched texts have the same content")
|
||||
else:
|
||||
if protocol in (NAME_DPCOM) and pastedText.endswith("\n"):
|
||||
pastedText = pastedText[:-1]
|
||||
test.compare(editor.plainText, pastedText,
|
||||
"Verify that pasted and fetched texts are the same")
|
||||
|
||||
if protocol == NAME_DPCOM:
|
||||
checkForMovedUrl()
|
||||
|
Reference in New Issue
Block a user