test exit
This commit is contained in:
@@ -52,6 +52,7 @@ fail_type unbound_variable UNBOUND_VARIABLE
|
|||||||
fail_type false FALSE
|
fail_type false FALSE
|
||||||
fail_type return RETURN
|
fail_type return RETURN
|
||||||
fail_type command_not_found COMMAND_NOT_FOUND
|
fail_type command_not_found COMMAND_NOT_FOUND
|
||||||
|
fail_type exit EXIT
|
||||||
|
|
||||||
failed=$((TEST_COUNT - SUCCESS_COUNT))
|
failed=$((TEST_COUNT - SUCCESS_COUNT))
|
||||||
if [[ $failed -gt 0 ]]; then
|
if [[ $failed -gt 0 ]]; then
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ function do_command_not_found {
|
|||||||
echo SHOULD NOT APPEAR
|
echo SHOULD NOT APPEAR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function do_exit {
|
||||||
|
echo START
|
||||||
|
call_function_which_will_exit
|
||||||
|
echo SHOULD NOT APPEAR
|
||||||
|
}
|
||||||
|
|
||||||
function do_unbound_associative {
|
function do_unbound_associative {
|
||||||
declare -A associative
|
declare -A associative
|
||||||
associative['A']='Abc'
|
associative['A']='Abc'
|
||||||
@@ -75,6 +81,11 @@ function do_unbound_variable {
|
|||||||
|
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
|
|
||||||
|
function call_function_which_will_exit {
|
||||||
|
exit 99
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function F2 {
|
function F2 {
|
||||||
echo "stdout A"
|
echo "stdout A"
|
||||||
# echo toto >>/tmp/toto
|
# echo toto >>/tmp/toto
|
||||||
|
|||||||
Reference in New Issue
Block a user