summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/common.sh b/tests/common.sh
index cd90eb8..93f8d53 100644
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -47,3 +47,11 @@ use()
exit 2
fi
}
+
+assert()
+{
+ if ! eval "${@}"; then
+ warn 'Assertion failed: %s\n' "${*}"
+ tests_es=1
+ fi
+}