diff options
Diffstat (limited to 'eclass/tests/tests-common.sh')
-rw-r--r-- | eclass/tests/tests-common.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh index a677842b6ac5..45b1e20b933a 100644 --- a/eclass/tests/tests-common.sh +++ b/eclass/tests/tests-common.sh @@ -60,6 +60,13 @@ die() { exit 1 } +assert() { + local x pipestatus=${PIPESTATUS[*]} + for x in ${pipestatus} ; do + [[ ${x} -eq 0 ]] || die "$@" + done +} + has_version() { while [[ $1 == -* ]]; do shift |