diff options
author | P. J. McDermott <pjm@nac.net> | 2012-09-09 15:22:55 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-09-09 15:22:55 (EDT) |
commit | f79a55cb6f646262008b1eeea7daca8e4fa00063 (patch) | |
tree | 2f3aeaf9d9c55f886a4751d8bf1fc46cca48a2ca /tests | |
parent | 98b18decf9dac47adaccfcd1cb89d0420e5349ee (diff) |
Fix test_assert.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/common.sh | 6 |
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 } |