Revision: 84aff57ab7a9
Branch: default
Author: Pekka Klärck
Date: Mon Sep 17 06:00:44 2012
Log: testdoc test: hopefully made tests pass also with ipy
http://code.google.com/p/robotframework/source/detail?r=84aff57ab7a9
Modified:
/atest/robot/testdoc/testdoc.txt
=======================================
--- /atest/robot/testdoc/testdoc.txt Wed Sep 12 15:17:39 2012
+++ /atest/robot/testdoc/testdoc.txt Mon Sep 17 06:00:44 2012
@@ -11,25 +11,28 @@
*** Test Cases ***
One input
- Run Testdoc And Verify Result ${INPUT 1} ${OUTFILE}
+ ${output}= Run TestDoc ${INPUT 1}
Testdoc Should Contain "name":"Pass And Fail" "title":"Pass And
Fail" "numberOfTests":2
+ Output Should Contain Outfile ${output}
Many inputs
- Run Testdoc And Verify Result --exclude t1 --title MyDoc ${INPUT 1}
${INPUT2} ${OUTFILE}
+ ${output}= Run TestDoc --exclude t1 --title MyDoc ${INPUT 1}
${INPUT2}
Testdoc Should Contain "name":"Pass And Fail &
Suites" "title":"MyDoc" "numberOfTests":6
Testdoc Should Not Contain "name":"Suite4 First"
+ Output Should Contain Outfile ${output}
Invalid usage
- Run Testdoc And Verify Result ${EMPTY} Expected at least 2
arguments, got 1.\n\nTry --help for usage information. 252
+ ${output}= Run TestDoc ${EMPTY} 252
+ Should Be Equal ${output} Expected at least 2 arguments, got
1.${USAGE TIP}
*** Keyword ***
-Run Testdoc And Verify Result
- [Arguments] ${args} ${expected output} ${expected rc}=0
+Run TestDoc
+ [Arguments] ${args} ${expected rc}=0
${rc} ${output}= Run And Return Rc And Output ${CMD} ${args}
${OUTFILE}
- Should Be Equal ${output} ${expected output}
Should Be Equal As Numbers ${rc} ${expected rc}
+ [Return] ${output}
Testdoc Should Contain
[Arguments] @{expected}
@@ -42,3 +45,11 @@
${testdoc}= Get File ${OUTFILE}
: FOR ${exp} IN @{expected}
\ Should Not Contain ${testdoc} ${exp}
+
+Output Should Contain Outfile
+ [Arguments] ${output}
+ [Documentation] Printed outfile may be in different formats.
+ ... IronPython seems to like c:\olddos~1\format~2.ext
+ File Should Exist ${output}
+ Remove File ${OUTFILE}
+ File Should Not Exist ${output}