Revision: 136
Author: janne.t.harkonen
Date: Thu Aug 16 04:16:20 2012
Log: add Start Command tests
http://code.google.com/p/robotframework-sshlibrary/source/detail?r=136
Added:
/trunk/atest/start_command.txt
=======================================
--- /dev/null
+++ /trunk/atest/start_command.txt Thu Aug 16 04:16:20 2012
@@ -0,0 +1,39 @@
+*** Settings ***
+Suite Setup Login and Move Test Files
+Suite Teardown Remove Test Files and Close Connections
+Test Teardown Execute Command rm -f ${TEST FILE NAME}
+Resource resources/ssh_library_resources.txt
+
+*** test cases ***
+Start Command And Read Process Output With Defaults
+ Start Command ./${TEST SCRIPT NAME}
+ ${stdout} = Read Command Output
+ Should Be Equal ${stdout} This is stdout
+
+Start Command And Read Only Return Code
+ Start Command ./${TEST SCRIPT NAME}
+ ${rc} = Read Command Output return_stdout=${EMPTY} return_rc=joo
+ Should Be Equal ${rc} ${0}
+
+Start Command And Execute Command
+ Start Command ./${TEST SCRIPT NAME}
+ ${stdout} = Execute Command ./${TEST SCRIPT NAME} Hello
+ Should Be Equal ${stdout} Hello
+ ${stdout} = Read Command Output
+ Should Be Equal ${stdout} This is stdout
+
+Start Command And Read Process Output With Legacy Stdout
+ Start Command ./${TEST SCRIPT NAME}
+ ${stdout} = Read Command Output STDOUT
+ Should Be Equal ${stdout} This is stdout
+
+Start Command And Read Process Output With Legacy Stderr
+ Start Command ./${TEST SCRIPT NAME}
+ ${stderr} = Read Command Output stderr
+ Should Be Equal ${stderr} This is stderr
+
+Start Command And Read Process Output With Legacy Stdout And Stderr
+ Start Command ./${TEST SCRIPT NAME}
+ ${stdout} ${stderr} = Read Command Output both
+ Should Be Equal ${stdout} This is stdout
+ Should Be Equal ${stderr} This is stderr