Revision: 4127
Author: pekka.klarck
Date: Fri Sep 24 01:25:00 2010
Log: fixed tests to work on windows
http://code.google.com/p/robotframework/source/detail?r=4127

Modified:
 /trunk/atest/robot/standard_libraries/operating_system/get_file_size.txt
 /trunk/atest/robot/standard_libraries/operating_system/list_dir.txt
 /trunk/atest/testdata/standard_libraries/operating_system/list_dir.txt

=======================================
--- /trunk/atest/robot/standard_libraries/operating_system/get_file_size.txt Thu Sep 23 07:13:19 2010 +++ /trunk/atest/robot/standard_libraries/operating_system/get_file_size.txt Fri Sep 24 01:25:00 2010
@@ -4,7 +4,7 @@
 Resource        atest_resource.txt

 *** Variables ***
-${TESTFILE}  ${TEMPDIR}/robot_temp_file.txt
+${TESTFILE}  ${TEMPDIR}${/}robot_temp_file.txt

 *** Test Cases ***
 Get File Size
=======================================
--- /trunk/atest/robot/standard_libraries/operating_system/list_dir.txt Thu Sep 23 09:42:58 2010 +++ /trunk/atest/robot/standard_libraries/operating_system/list_dir.txt Fri Sep 24 01:25:00 2010
@@ -1,4 +1,4 @@
-*** Settings ***
+*** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/operating_system/list_dir.txt
 Force Tags      regression  pybot  jybot
 Resource        atest_resource.txt
@@ -46,10 +46,10 @@

 List Directory With Absolute
     ${tc} =  Check Test Case  ${TESTNAME}
- Verify List Message ${tc.kws[1]} 2 items \n${BASE}${/}${F1}\n${BASE}${/}${F2} - Verify List Message ${tc.kws[3]} 2 files \n${BASE}${/}${F1}\n${BASE}${/}${F2}
-    Verify List Message  ${tc.kws[5]}  1 directory  \n${BASE}${/}${DIR}
- Check Log Message ${tc.kws[5].msgs[1]} Signature of 'List Directory' keywords has changed. Please update how 'absolute' argumemt is given. WARN + Verify List Message ${tc.kws[0]} 2 items \n${BASE}${/}${F1}\n${BASE}${/}${F2} + Verify List Message ${tc.kws[2]} 2 files \n${BASE}${/}${F1}\n${BASE}${/}${F2}
+    Verify List Message  ${tc.kws[4]}  1 directory  \n${BASE}${/}${DIR}
+ Check Log Message ${tc.kws[4].msgs[1]} Signature of 'List Directory' keywords has changed. Please update how 'absolute' argumemt is given. WARN


 *** Keywords ***
@@ -68,4 +68,3 @@
     [Arguments]  ${kw}  ${count}
Check Log Message ${kw.msgs[0]} Listing contents of directory '<a href="file://${BASE}">${BASE}</a>'. HTML
     Check Log Message  ${kw.msgs[1]}  ${count}.
-
=======================================
--- /trunk/atest/testdata/standard_libraries/operating_system/list_dir.txt Thu Sep 23 09:42:58 2010 +++ /trunk/atest/testdata/standard_libraries/operating_system/list_dir.txt Fri Sep 24 01:25:00 2010
@@ -1,4 +1,4 @@
-*** Settings ***
+*** Settings ***
 Test Setup      Create Test Directories
 Suite Teardown  Remove Test Directories
 Library         OperatingSystem
@@ -46,13 +46,12 @@
     List And Count Directories In Directory With Pattern  *.txt

 List Directory With Absolute
-    @{expected} =  Create List  ${BASE}${/}${F1}  ${BASE}${/}${F2}
     @{items} =  List Directory  ${BASE}  *.txt  absolute
-    Lists Should Be Equal  ${items}  ${expected}
+ Listing Should Have Correct Items ${items} ${BASE}${/}${F1} ${BASE}${/}${F2}
     @{items} =  List Files In Directory  ${BASE}  absolute=yes
-    Lists Should Be Equal  ${items}  ${expected}
+ Listing Should Have Correct Items ${items} ${BASE}${/}${F1} ${BASE}${/}${F2} @{items} = List Directories In Directory ${BASE} ${EMPTY} ${EMPTY} deprecated absolute
-    Should Be True  @{items} == ['${BASE}${/}${DIR}']
+    Listing Should Have Correct Items  ${items}  ${BASE}${/}${DIR}


 *** Keywords ***
@@ -108,3 +107,7 @@
     ${count} =  Count Directories In Directory  ${BASE}  ${pattern}
     Lists Should Be Equal  ${items}  ${expected}
     Length Should Be  ${items}  ${count}
+
+Listing Should Have Correct Items
+    [Arguments]  ${items}  @{expected}
+    Lists Should Be Equal  ${items}  ${expected}

Reply via email to