summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtestautomation/global/tools/includes/required/t_dir.inc23
-rwxr-xr-xtestautomation/global/tools/includes/required/t_tools1.inc6
-rwxr-xr-x[-rw-r--r--]testautomation/xml/optional/includes/docbook_001.inc2
-rwxr-xr-xtestautomation/xml/tools/includes/xmltool1.inc2
4 files changed, 7 insertions, 26 deletions
diff --git a/testautomation/global/tools/includes/required/t_dir.inc b/testautomation/global/tools/includes/required/t_dir.inc
index 2f2e9503fa2a..8fa858faf3c2 100755
--- a/testautomation/global/tools/includes/required/t_dir.inc
+++ b/testautomation/global/tools/includes/required/t_dir.inc
@@ -37,30 +37,11 @@
'*
'\************************************************************************
-function hFileExists ( Dat as String ) as Boolean
+function hFileExists ( file as String ) as Boolean
'/// Checks if a file exists
'/// <u>Input</u>: Filename with complete path
'/// <u>Return</u>: TRUE or FALSE if the file exists.
- if app.Dir ( Dat ) = "" then
- hFileExists = FALSE
- else
- hFileExists = TRUE
- end if
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hDirectoryExists ( Verz as String ) as Boolean
- '/// Checks if a directory exists
- '/// <u>Input</u>: Directory with complete path
- '/// <u>Return</u>: TRUE or FALSE if the directory exists.
- ' at the end of the string has to be teh path seperator, else the dir-command doesn't work
- if right ( Verz, 1 ) <> gPathSigne then Verz = Verz + gPathsigne
- if app.Dir ( Verz, 16 ) = "" then
- hDirectoryExists = FALSE
- else
- hDirectoryExists = TRUE
- end if
+ hFileExists() = FileExists( file )
end function
'
'-------------------------------------------------------------------------------
diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc
index bba3e098f108..4f7cf969fe0a 100755
--- a/testautomation/global/tools/includes/required/t_tools1.inc
+++ b/testautomation/global/tools/includes/required/t_tools1.inc
@@ -418,10 +418,10 @@ sub DialogTest( Window, optional iNumber as integer)
'save with respect to application and language
sCapturePath = ConvertPath (gOfficePath + "user\work\screenshots"+iSprache+"\")
sPicName = sCapturePath + lCase(gApplication)
+
'create directory if it doesn't exist
- if hDirectoryExists(sPicName) <> TRUE then
- mkdir (sPicName)
- end if
+ if ( not FileExists(sPicName) ) then mkdir sPicName
+
sPicName = sPicName + sName
try
sleep 1
diff --git a/testautomation/xml/optional/includes/docbook_001.inc b/testautomation/xml/optional/includes/docbook_001.inc
index a084fdee59fd..38f13921478b 100644..100755
--- a/testautomation/xml/optional/includes/docbook_001.inc
+++ b/testautomation/xml/optional/includes/docbook_001.inc
@@ -49,7 +49,7 @@ sub tDocBookXMLtestdocs
exit sub
end if
'Calculating how many documents are in that directory (max. 500)
- if hDirectoryExists(sSourcePath) then
+ if FileExists(sSourcePath) then
'Get the file list and put it in a list (max. 500 per directory!)
call GetAllFileList(sSourcePath, "*.xml" , sSourceDocuments())
iNumberOfDocuments = ListCount(sSourceDocuments())
diff --git a/testautomation/xml/tools/includes/xmltool1.inc b/testautomation/xml/tools/includes/xmltool1.inc
index 4adbabb78fc1..0c240d1b4b09 100755
--- a/testautomation/xml/tools/includes/xmltool1.inc
+++ b/testautomation/xml/tools/includes/xmltool1.inc
@@ -49,7 +49,7 @@ sub CreateWorkXMLExportDir ( DirName as string )
Dim Isliste(200) as string
Dim i, BornToKill
printlog "Checking work-dir & creating '" & gOfficePath & ConvertPath(DirName) & "'."
- if hDirectoryExists ( gOfficePath & ConvertPath(DirName) ) = TRUE then
+ if ( FileExists( gOfficePath & ConvertPath( DirName) ) then
OutputPath = gOfficePath & ConvertPath(DirName)
IsListe(0) = 0
GetFileList ( OutputPath , "*", IsListe() )