Commit a65906ce authored by Vojtěch Horký's avatar Vojtěch Horký
Browse files

Extended assert_status

parent 1ce5b935
......@@ -95,6 +95,12 @@ assert_status() {
shift
local message="${msg:-Program exit code mismatch}"
if [[ "${expected}" == 'not 0' ]]; then
if [[ "${status}" -ne 0 ]]; then
expected="${status}"
fi
fi
if [[ "${status:-}" != "${expected}" ]]; then
if "${hide_exit_code:-false}"; then
batslib_print_kv_single_or_multi 8 "$@"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment