summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/common.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/common.sh b/tests/common.sh
index 991566f..c32b3a1 100644
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -45,8 +45,10 @@ ob_use()
test_assert()
{
- if ! $(eval "${@}"); then
+ eval "${*}"
+ es="${?}"
+ if [ "${es}" -ne 0 ]; then
printf 'Assertion failed with exit status %d:\n %s\n' \
- "${?}" "${@}"
+ "${es}" "${*}"
fi
}