Revision: 3241
Author: janne.t.harkonen
Date: Mon May 10 00:49:52 2010
Log: tests for dry run
http://code.google.com/p/robotframework/source/detail?r=3241
Added:
/trunk/atest/robot/cli/runner/dryrun.txt
/trunk/atest/testdata/cli
/trunk/atest/testdata/cli/dryrun.txt
=======================================
--- /dev/null
+++ /trunk/atest/robot/cli/runner/dryrun.txt Mon May 10 00:49:52 2010
@@ -0,0 +1,41 @@
+*** Settings ***
+Suite Setup Run Tests --runmode dryrun cli/dryrun.txt
+Force Tags regression pybot jybot
+Resource atest_resource.txt
+
+*** Test Cases ***
+
+No Failures
+ ${tc}= Check Test Case ${TESTNAME}
+ Should have correct number of keywords ${tc} 2
+ Should have correct number of keywords ${tc.kws[1]} 1
+
+Failures
+ ${tc}= Check Test Case ${TESTNAME}
+ Should have correct number of keywords ${tc} 3
+ Should have correct number of keywords ${tc.kws[1]} 2
+
+For Loops
+ ${tc}= Check Test Case ${TESTNAME}
+ Should have correct number of keywords ${tc} 2
+ Should have correct number of keywords ${tc.kws[0]} 1
+ Should have correct number of keywords ${tc.kws[0].kws[0]} 2
+ Should have correct number of keywords ${tc.kws[1]} 2
+
+Non-existing keyword name
+ ${tc}= Check Test Case ${TESTNAME}
+
+Wrong Number of Arguments
+ ${tc}= Check Test Case ${TESTNAME}
+
+Wrong Number of Arguments for UK
+ ${tc}= Check Test Case ${TESTNAME}
+
+Arguments given as list variable
+ ${tc}= Check Test Case ${TESTNAME}
+
+*** Keywords ***
+Should have correct number of keywords
+ [Arguments] ${test or uk} ${exp number of kws}
+ Log ${test or uk.kws}
+ Should Be Equal As Integers ${test or uk.kws.__len__()} ${exp number
of kws}
=======================================
--- /dev/null
+++ /trunk/atest/testdata/cli/dryrun.txt Mon May 10 00:49:52 2010
@@ -0,0 +1,55 @@
+*** Test Cases ***
+
+No Failures
+ Log Hello from test
+ Simple UK
+
+Failures
+ Fail
+ Fail In Uk
+ No Operation
+
+For Loops
+ ::FOR ${i} IN RANGE 10
+ \ Log ${i}
+ \ Fail
+ For Loop in UK
+
+Non-existing keyword name
+ [ Documentation ] FAIL No keyword with name 'Does not exist' found.
+ Does not exist
+
+Wrong Number of Arguments
+ [Documentation] FAIL Keyword 'BuiltIn.Should Be Equal' expected 2 to
4 arguments, got 1.
+ Should Be Equal 1
+
+Wrong Number of Arguments for UK
+ [Documentation] FAIL Keyword 'Anarchy In The UK' expected 2
arguments, got 1.
+ Anarchy in the UK foo
+
+Arguments given as list variable
+ [Documentation] FAIL Keyword 'BuiltIn.Should Be Equal' expected 2 to
4 arguments, got 1.
+ @{list} = Create List 1 1
+ Should Be Equal @{list}
+ Anarchy in the UK @{list}
+ @{empty list} Create List
+ Convert to Number 1 @{empty list}
+ Should Be Equal @{foo
+
+
+*** Keywords ***
+Simple UK
+ Log Hello from UK
+
+Fail In UK
+ Fail
+ Fail And again
+
+For Loop in UK
+ ::FOR ${i} IN RANGE 10
+ \ Should be Equal ${i} 0
+ Fail
+
+Anarchy in the UK
+ [Arguments] ${a1} ${a2}
+ Fail ${a1}${2}