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

Extend assert_status function

parent 56836ce6
......@@ -96,12 +96,14 @@ assert_status() {
local message="${msg:-Program exit code mismatch}"
if [[ "${status:-}" != "${expected}" ]]; then
batslib_print_kv_single_or_multi 8 \
'actual' "${status:-}" \
'expected' "${expected}" \
"$@" \
| batslib_decorate "${message}" \
| fail
if "${hide_exit_code:-false}"; then
batslib_print_kv_single_or_multi 8 "$@"
else
batslib_print_kv_single_or_multi 8 \
'actual' "${status:-}" \
'expected' "${expected}" \
"$@"
fi | batslib_decorate "${message}" | fail
fi
}
......
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