forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user