summaryrefslogtreecommitdiffstats
path: root/tests/aux
diff options
context:
space:
mode:
Diffstat (limited to 'tests/aux')
-rw-r--r--tests/aux/common.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/aux/common.sh b/tests/aux/common.sh
index 27db133..3082ab0 100644
--- a/tests/aux/common.sh
+++ b/tests/aux/common.sh
@@ -1,6 +1,6 @@
# Common testsuite functions
#
-# Copyright (C) 2019 Patrick McDermott
+# Copyright (C) 2018, 2019 Patrick McDermott
#
# This file is part of the ProteanOS Development Kit.
#
@@ -21,6 +21,23 @@
LF='
'
+is()
+{
+ local description="${1}"
+ local got="${2}"
+ local expected="${3}"
+ shift 3
+
+ if [ "x${got}" = "x${expected}" ]; then
+ ok_ -- "${description}"
+ else
+ not_ok_ -- "${description}"
+ diag_ " Failed test '${description}'"
+ diag_ " got: '${got}'"
+ diag_ " expected: '${expected}'"
+ fi
+}
+
# is_diff() is based on cmd_is() from opkbuild 4.0.2, with test results passed
# by argument and context added to the diagnostic output.
is_diff()