Squish: Fix searching for filename in windowTitle

Currently, only the end of a filename as actually
compared since the title also contains "filename.h"
when the title starts with "otherfilename.h"

Change-Id: I60dd4dc1fd7c53fee2ddbc44953bcfe4d75c7530
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2017-08-29 17:48:37 +02:00
parent 69b75895fa
commit ba1036fd46
5 changed files with 7 additions and 7 deletions

View File

@@ -246,7 +246,7 @@ def verifyBreakPoint(bpToVerify):
textPos = editor.textCursor().position()
line = str(editor.plainText)[:textPos].count("\n") + 1
windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
test.verify(os.path.basename(fileName) in windowTitle,
test.verify(windowTitle.startswith(os.path.basename(fileName) + " "),
"Verify that Creator's window title changed according to current file")
return test.compare(line, bpToVerify.values()[0],
"Compare hit breakpoint to expected line number in %s" % fileName)