diff --git a/functions/test_functions.sh b/functions/test_functions.sh index d984e5523..ecc2a1c9c 100644 --- a/functions/test_functions.sh +++ b/functions/test_functions.sh @@ -582,6 +582,14 @@ test_unparked_check() { printf "unparked,google.com,parked_domains\n" >> out_log.txt } +# Function 'on_exit' exits the script with exit status 1 if an error was found. +on_exit() { + if [[ "$error" == true ]]; then + printf "\n" + exit 1 + fi +} + # Function 'run_script' executes the script passed by the caller. # Input: # $1: scrip to execute @@ -631,14 +639,6 @@ check_and_exit() { on_exit } -# Function 'on_exit' exits the script with exit status 1 if an error was found. -on_exit() { - if [[ "$error" == true ]]; then - printf "\n" - exit 1 - fi -} - # Function 'check_terms' checks that a file contains all the given terms. # Input: # $1: file to check