Revision: 6d94f32b1eaf
Branch:   default
Author:   Pekka Klärck
Date:     Tue Apr 29 17:09:17 2014 UTC
Log:      little test data clean-up
http://code.google.com/p/robotframework/source/detail?r=6d94f32b1eaf

Modified:
 /atest/robot/standard_libraries/operating_system/get_file.txt
 /atest/testdata/standard_libraries/operating_system/get_file.txt

=======================================
--- /atest/robot/standard_libraries/operating_system/get_file.txt Tue Apr 29 15:16:49 2014 UTC +++ /atest/robot/standard_libraries/operating_system/get_file.txt Tue Apr 29 17:09:17 2014 UTC
@@ -14,19 +14,6 @@

 Get File With Space In Name
     Check testcase  ${TESTNAME}
-
-Get Binary File
-    Check testcase  ${TESTNAME}
-
-Log File
-    ${tc}=    Check testcase    ${TESTNAME}
- Check Log Message ${tc.kws[1].msgs[1]} hello world\nwith two lines
-
-Log File with default encoding and error handlers
-    ${tc}=    Check testcase    ${TESTNAME}
-    Log    ${tc.kws[0].kws[0].msgs}
-    Check Log Message     ${tc.kws[0].kws[0].msgs[1]}    Hyv t
-    Check Log Message     ${tc.kws[1].kws[0].msgs[1]}    Hyv�� ��t�

 Get Utf-8 File
     Check testcase  ${TESTNAME}
@@ -45,10 +32,25 @@

 Get File with Default Encoding and error handlers
     Check testcase    ${TESTNAME}
+
+Log File
+    ${tc}=    Check testcase    ${TESTNAME}
+ Check Log Message ${tc.kws[1].msgs[1]} hello world\nwith two lines

 Log Latin-1 With Latin-1 Encoding
     ${tc} =  Check testcase  ${TESTNAME}
     Check Log Message  ${tc.kws[0].msgs[1]}  Hyvää üötä
+
+Log File with default encoding and error handlers
+    ${tc}=    Check testcase    ${TESTNAME}
+    Check Log Message     ${tc.kws[0].kws[0].msgs[1]}    Hyv t
+ Check Log Message ${tc.kws[1].kws[0].msgs[1]} Hyv\ufffd\ufffd \ufffd\ufffdt\ufffd
+
+Get Binary File preserves CRLF line endings
+    Check testcase    ${TESTNAME}
+
+Get Binary File returns bytes as-is
+    Check testcase    ${TESTNAME}

 Grep File
     ${tc}=    Check testcase    ${TESTNAME}
=======================================
--- /atest/testdata/standard_libraries/operating_system/get_file.txt Tue Apr 29 15:16:49 2014 UTC +++ /atest/testdata/standard_libraries/operating_system/get_file.txt Tue Apr 29 17:09:17 2014 UTC
@@ -2,6 +2,7 @@
 Test Setup      Create Base Test Directory
 Suite Teardown  Remove Base Test Directory
 Resource        os_resource.txt
+Library         String

 *** Variables ***
 ${UTF-8 FILE}               ${CURDIR}${/}files${/}utf-8.txt
@@ -34,21 +35,6 @@
     ${file} =  Get File  ${WITH SPACE}
     Should Be Equal  ${file}  content

-Get Binary File
-    Create File  ${TESTFILE}  hello world\r\nbinary
-    ${file}=  Get Binary File  ${TESTFILE}
-    Should Be Equal  ${file}  hello world\r\nbinary
-
-Log File
-    Create File    ${TESTFILE}    hello world\nwith two lines
-    ${file}=    Log File    ${TESTFILE}
-    Should Be Equal    ${file}    hello world\nwith two lines
-
-Log File with default encoding and error handlers
-    [Template]    Verify Log File with error handler
-    ignore      Hyv t
-    replace     Hyv�� ��t�
-
 Get Utf-8 File
     ${file} =  Get File  ${UTF-8 FILE}
     Should Be Equal  ${file}  ${RESULT}
@@ -76,9 +62,30 @@
${UTF-16 BE FILE} replace \x00H\x00y\x00v\x00\ufffd\x00\ufffd\x00 \x00\ufffd\x00\ufffd\x00t\x00\ufffd\x00\n\x00f\x00\ufffd\x00\ufffd\x00 \x00b\x00a\x00r
     ${LATIN-1 FILE}      replace    Hyv\ufffd\ufffd \ufffd\ufffdt\ufffd

+Log File
+    Create File    ${TESTFILE}    hello world\nwith two lines
+    ${file}=    Log File    ${TESTFILE}
+    Should Be Equal    ${file}    hello world\nwith two lines
+
 Log Latin-1 With Latin-1 Encoding
     ${file} =  Log File  ${LATIN-1 FILE}  Latin-1
     Should be equal    ${file}    ${RESULT}
+
+Log File with default encoding and error handlers
+    [Template]    Verify Log File with error handler
+    ignore      Hyv t
+    replace     Hyv\ufffd\ufffd \ufffd\ufffdt\ufffd
+
+Get Binary File preserves CRLF line endings
+    Create File  ${TESTFILE}  hello world\r\nbinary
+    ${file}=  Get Binary File  ${TESTFILE}
+    Should Be Equal  ${file}  hello world\r\nbinary
+
+Get Binary File returns bytes as-is
+    ${file}=  Get Binary File  ${LATIN-1 FILE}
+    ${expected}=  Convert To Bytes  Hyv\xe4\xe4 \xfc\xf6t\xe4
+    Should Be Byte String    ${file}
+    Should Be Equal  ${file}  ${expected}

 Grep File
     [Template]    Grep And Check File

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to