Revision: 3169
Author: KariHusa
Date: Wed May 5 02:47:45 2010
Log: Tests for new keyword run keyword and continue on failure, issue 545
http://code.google.com/p/robotframework/source/detail?r=3169
Added:
/trunk/atest/robot/standard_libraries/builtin/run_keyword_and_continue_on_failure.txt
/trunk/atest/testdata/standard_libraries/builtin/run_keyword_and_continue_on_failure.txt
=======================================
--- /dev/null
+++
/trunk/atest/robot/standard_libraries/builtin/run_keyword_and_continue_on_failure.txt
Wed May 5 02:47:45 2010
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup Run Tests ${EMPTY}
standard_libraries/builtin/run_keyword_and_continue_on_failure.txt
+Force Tags regression pybot jybot
+Resource atest_resource.txt
+
+*** Test Cases ***
+
+Run Keyword And Continue On Failure
+ ${tc}= Check Test Case ${TESTNAME}
+ Check Log Message ${tc.kws[0].kws[0].msgs[0]} Expected Failure FAIL
+ Check Log Message ${tc.kws[1].kws[0].msgs[0]} Expected Failure 2
FAIL
+ Check Log Message ${tc.kws[2].msgs[0]} This should be executed
+
+Run Keyword And Continue On Failure In For Loop
+ Check Test Case ${TESTNAME}
+
+Run User keyword And Continue On Failure
+ ${tc}= Check Test Case ${TESTNAME}
+ Check Log Message ${tc.kws[1].msgs[0]} This should be executed
+
=======================================
--- /dev/null
+++
/trunk/atest/testdata/standard_libraries/builtin/run_keyword_and_continue_on_failure.txt
Wed May 5 02:47:45 2010
@@ -0,0 +1,32 @@
+*** Settings ***
+Library Exceptions
+
+*** Test Cases ***
+Run Keyword And Continue On Failure
+ [Documentation] FAIL Several failures occurred:\n\n
+ ... 1) Expected Failure\n\n
+ ... 2) Expected Failure 2
+ Run keyword And Continue On Failure Fail Expected Failure
+ Run keyword And Continue On Failure Fail Expected Failure 2
+ Log This should be executed
+
+Run Keyword And Continue On Failure In For Loop
+ [Documentation] FAIL Several failures occurred:\n\n
+ ... 1) 3 != 0\n\n
+ ... 2) 3 != 1\n\n
+ ... 3) 3 != 2\n\n
+ ... 4) 3 != 4\n\n
+ ... 5) Stop here!!
+ :FOR ${i} IN RANGE 0 5
+ \ Run keyword And Continue On Failure Should Be Equal ${3} ${i}
+ Fail Stop here!!
+ Fail This isn't executed anymore
+
+Run User keyword And Continue On Failure
+ [Documentation] FAIL Expected Failure
+ Run keyword And Continue On Failure Exception In User Keyword
+ Log This should be executed
+
+*** Keywords ***
+Exception In User Keyword
+ Fail Expected Failure