From f79a55cb6f646262008b1eeea7daca8e4fa00063 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 15:22:55 -0400 Subject: Fix test_assert. --- (limited to 'tests') 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 } -- cgit v0.9.1