Sample-Is An Array Variable

Setting Value
Library Collections
Variable Value
${ELSE} 1==1
Test Case Action Arguments
Test Return Values ${result} ${array_var} Run Keyword And Ignore Error Return Array
${mock_array_var} Set Variable [u'1', u'2', u'3']
@{array} Convert To List ${array_var}
@{array} Convert To List ${mock_array_var}
Test Is An Array Variable @{array_var} Create List 1 2
... 3
${array_var} Set Variable @{array_var}
${mock_array_var} Set Variable [u'1', u'2', u'3']
${check_result} Is An Array Variable ${array_var}
Should Be Equal As Strings ${check_result} TRUE
${check_result} Is An Array Variable ${mock_array_var}
Should Be Equal As Strings ${check_result} FALSE
@{array_var} Create List
${array_var} Set Variable @{array_var}
${check_result} Is An Array Variable ${array_var}
Should Be Equal As Strings ${check_result} FALSE
${check_result} Is An Array Variable ${None}
Should Be Equal As Strings ${check_result} FALSE
Keyword Action Arguments
Is An Array Variable [Arguments] ${variable}=${EMPTY}
[Documentation] Confirm the ${variable}'s content whether is a array var or not.
@{check_result} Run Keyword And Ignore Error Should Be Equal ${variable}
... ${None}
${variable} Set Variable If '@{check_result}[0]'=='PASS' ${EMPTY}
... ${ELSE} ${variable}
@{array} Convert To List ${variable}
@{check_result} Run Keyword And Ignore Error Should Be Empty ${variable}
${prefix} Set Variable If '@{check_result}[0]'=='PASS' ${EMPTY}
... ${ELSE} @{array}[0]
@{check_result} Run Keyword And Ignore Error Should Start With ${variable}
... ${prefix}
${result} Set Variable If '@{check_result}[0]'=='PASS' FALSE
... ${ELSE} TRUE
[Return] ${result}
Return Array @{return} Create List 1 2
... 3
[Return] @{return}