*** Settings ***
Suite Setup     Set Runners
Default Tags    regression  pybot  jybot
Resource        cli_resource.txt

*** Variables ***
${MISCDIR}  ${CURDIR}${/}..${/}..${/}..${/}testdata${/}misc
${PASSINGSUITE}  ${MISCDIR}${/}normal.html
${FAILINGSUITE}  ${MISCDIR}${/}pass_and_fail.html

*** Test Cases ***
Zero Return Code When All Tests Pass
    Return code can be forced to zero from commandline  ${PASSINGSUITE}

Zero Return Code When Some Tests Fail
    Return code can be forced to zero from commandline  ${FAILINGSUITE}

*** Keywords ***
Return code can be forced to zero from commandline
    [Arguments]  ${datasource}
    ${rc}=  Run And Return Rc  ${ROBOT} --nostatusrc --outputdir ${TEMPDIR} ${datasource}
    Should Be Equal As Integers  ${rc}  0

*** Settings ***
Suite Setup     Set Runners
Default Tags    regression  pybot  jybot
Resource        cli_resource.txt

*** Variables ***
${MISCDIR}  ${CURDIR}${/}..${/}..${/}..${/}testdata${/}misc
${PASSINGSUITE}  ${MISCDIR}${/}normal.html
${FAILINGSUITE}  ${MISCDIR}${/}pass_and_fail.html

*** Test Cases ***
Zero Return Code When All Tests Pass
    Return code can be forced to zero from commandline  ${PASSINGSUITE}

Zero Return Code When Some Tests Fail
    Return code can be forced to zero from commandline  ${FAILINGSUITE}

None Zero Return Code When Some Tests Fail
    ${rc}=  Run And Return Rc  ${ROBOT} --outputdir ${TEMPDIR} ${FAILINGSUITE}
    Should Be Equal As Integers  ${rc}  1

*** Keywords ***
Return code can be forced to zero from commandline
    [Arguments]  ${datasource}
    ${rc}=  Run And Return Rc  ${ROBOT} --nostatusrc --outputdir ${TEMPDIR} ${datasource}
    Should Be Equal As Integers  ${rc}  0


Add test for robot none zero return code
Add test for robot none zero return code
