summary refs log tree commit diff
path: root/t/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lib.sh')
-rw-r--r--t/lib.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/lib.sh b/t/lib.sh
index 81c2dd1..567250b 100644
--- a/t/lib.sh
+++ b/t/lib.sh
@@ -14,6 +14,17 @@ check() {
 	true
 }
 
+check_test() {
+	msg=$1; op=$2; test=$3; shift 3
+	if [ "$(eval "$@" 2>/dev/null)" "$op" "$test" ]; then
+		printf 'ok - %s\n' "$msg"
+	else
+		printf 'not ok - %s\n' "$msg"
+		false
+	fi
+	true
+}
+
 check_same() {
 	msg=$1
 	shift