Revision: 5f755bc56da7
Author: Janne Härkönen <[email protected]>
Date: Mon May 9 04:35:19 2011
Log: added tests for keyword teardown with dryrun
http://code.google.com/p/robotframework/source/detail?r=5f755bc56da7
Modified:
/atest/robot/cli/dryrun/dryrun.txt
/atest/testdata/cli/dryrun/dryrun.txt
=======================================
--- /atest/robot/cli/dryrun/dryrun.txt Fri Aug 20 05:59:35 2010
+++ /atest/robot/cli/dryrun/dryrun.txt Mon May 9 04:35:19 2011
@@ -20,6 +20,17 @@
Should have correct number of keywords ${tc} 3
Should have correct number of keywords ${tc.kws[1]} 2
+Test Setup and Teardown
+ ${tc}= Check Test Case ${TESTNAME}
+ Should have correct number of keywords ${tc} 1
+ Should Be Equal ${tc.setup.name} BuiltIn.Log
+ Should Be Equal ${tc.teardown.name} Does not exist
+
+Keyword Teardown
+ ${tc}= Check Test Case ${TESTNAME}
+ Should have correct number of keywords ${tc} 1
+ Should Be Equal ${tc.kws[0].kws[1].name} Does not exist
+
For Loops
${tc}= Check Test Case ${TESTNAME}
Should have correct number of keywords ${tc} 3
@@ -39,7 +50,7 @@
Too many arguments
Check Test Case ${TESTNAME}
-
+
Invalid syntax in UK
Check Test Case ${TESTNAME}
=======================================
--- /atest/testdata/cli/dryrun/dryrun.txt Thu Jul 22 06:40:10 2010
+++ /atest/testdata/cli/dryrun/dryrun.txt Mon May 9 04:35:19 2011
@@ -22,6 +22,16 @@
Userkeyword return value
${quux}= Some Return Value ${foo} ${bar}
+
+Test Setup And Teardown
+ [Documentation] FAIL No keyword with name 'Does not exist'
found.\n\nAlso teardown failed:\nNo keyword with name 'Does not exist'
found.
+ [Setup] Log Hello Setup
+ Does not exist
+ [Teardown] Does not exist
+
+Keyword Teardown
+ [Documentation] FAIL Keyword teardown failed:\nNo keyword with
name 'Does not exist' found.
+ Keyword with Teardown
For Loops
[Documentation] FAIL Keyword 'resource.Anarchy in the UK' expected 3
arguments, got 2.
@@ -62,7 +72,7 @@
Should Be Equal 1
UK with multiple failures
Does not exist
-
+
Arguments given as list variable
[Documentation] FAIL Keyword 'BuiltIn.Should Be Equal' expected 2 to
4 arguments, got 1.
@{list} = Create List 1 1
@@ -75,6 +85,10 @@
*** Keywords ***
+Keyword with Teardown
+ No Operation
+ [Teardown] Does not exist
+
Invalid Syntax UK
[Arguments] ${arg
No Operation
@@ -87,3 +101,4 @@
Invalid Syntax UK
Log too many arguments here
Yet another non-existing keyword
+