forked from qt-creator/qt-creator
Squish: Move simpleFileName() into shared script
Change-Id: I359af17fcbc67149fab4e291142523b436a43832 Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -647,3 +647,6 @@ def readFile(filename):
|
|||||||
content = f.read()
|
content = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
def simpleFileName(navigatorFileName):
|
||||||
|
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
||||||
|
|||||||
@@ -149,9 +149,6 @@ def checkUnsavedChangesContains(model, filePaths):
|
|||||||
test.compare(set(foundItems), set(filePaths),
|
test.compare(set(foundItems), set(filePaths),
|
||||||
"Verifying whether modified (unsaved) files do match expected.")
|
"Verifying whether modified (unsaved) files do match expected.")
|
||||||
|
|
||||||
def simpleFileName(navigatorFileName):
|
|
||||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
|
||||||
|
|
||||||
def cleanup():
|
def cleanup():
|
||||||
global testFolder
|
global testFolder
|
||||||
if testFolder:
|
if testFolder:
|
||||||
|
|||||||
@@ -166,6 +166,3 @@ def revertChanges(files):
|
|||||||
"Maybe it has not been changed at all.")
|
"Maybe it has not been changed at all.")
|
||||||
else:
|
else:
|
||||||
test.fail("Could not open %s for reverting changes" % simpleName)
|
test.fail("Could not open %s for reverting changes" % simpleName)
|
||||||
|
|
||||||
def simpleFileName(navigatorFileName):
|
|
||||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
|
||||||
|
|||||||
@@ -140,6 +140,3 @@ def compareFileToOriginal(fileName):
|
|||||||
origFile.close()
|
origFile.close()
|
||||||
test.compare(originalContent, currentContent,
|
test.compare(originalContent, currentContent,
|
||||||
"Comparing original to reverted file content for '%s'" % fileName)
|
"Comparing original to reverted file content for '%s'" % fileName)
|
||||||
|
|
||||||
def simpleFileName(navigatorFileName):
|
|
||||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
|
||||||
|
|||||||
@@ -147,6 +147,3 @@ def verifyOutline(outlinePseudoTree, datasetFileName):
|
|||||||
return
|
return
|
||||||
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
|
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
|
||||||
% (len(expected), fileName))
|
% (len(expected), fileName))
|
||||||
|
|
||||||
def simpleFileName(navigatorFileName):
|
|
||||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\", "")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user