fix return 0 show error_box
This commit is contained in:
@@ -119,6 +119,7 @@ TIMEFORMAT=$'\nelapsed: %Rs'
|
||||
time {
|
||||
assert success
|
||||
assert exit_0
|
||||
assert return_conditional
|
||||
assert_grep success_with_args 'count args: 2' -- 'A B' C
|
||||
|
||||
fail_type subshell_term SUBSHELL_ERROR
|
||||
|
||||
@@ -58,6 +58,15 @@ function do_return {
|
||||
should_return
|
||||
}
|
||||
|
||||
function do_return_conditional {
|
||||
if call_function_which_will_return; then
|
||||
echo SHOULD NOT APPEAR
|
||||
else
|
||||
echo return is: $?
|
||||
fi
|
||||
echo SUCCESS
|
||||
}
|
||||
|
||||
function do_unbound_associative {
|
||||
declare -A associative
|
||||
associative['A']='Abc'
|
||||
|
||||
Reference in New Issue
Block a user