diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-11-15T11·23+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-11-15T11·23+0100 |
commit | 27131866c929d2fc7690bc7f177375df9af8e213 (patch) | |
tree | 34ac67612355fa24491517e03c5da80fefdcebee | |
parent | 2f5789c5d6e779ae246659b2974560f14e24ac31 (diff) |
Doh
-rw-r--r-- | tests/common.sh.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in index 04d605e34438..ca6df25362dc 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -90,4 +90,15 @@ fail() { exit 1 } +expect() { + local expected res + expected="$1" + shift + set +e + "$@" + res="$?" + set -e + [[ $res -eq $expected ]] +} + set -x |