diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-01-15 18:44:47 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-01-15 22:58:50 +0100 |
commit | f74a6fa120759d0a1bd4a5aff0dc2c50911b5407 (patch) | |
tree | af08070ef3b99b13a73f8aefc652fc0e16ea1fea /test/integration/framework | |
parent | 50bd6fd3794dd1f61185302129dc6cd218d20b98 (diff) |
rework some testcases to not spit out text
Rework also uncovers two FIXMEs
Git-Dch: Ignore
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/integration/framework b/test/integration/framework index 6ada1e9cc..2fe059280 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -948,22 +948,22 @@ testempty() { test -z "$($* 2>&1)" && msgpass || msgfail } -testequalwithmsg() { - local MSG="$1" - shift +testequal() { + local MSG='Test of equality of' + if [ "$1" = '--nomsg' ]; then + MSG='' + shift + fi + local COMPAREFILE=$(mktemp) addtrap "rm $COMPAREFILE;" echo "$1" > $COMPAREFILE shift - msgtest "$MSG" - $* 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail -} -testequal() { - local EXPECTED="$1" - shift - local MSG="Test for equality of $*" - testequalwithmsg "$MSG" "$EXPECTED" $* + if [ -n "$MSG" ]; then + msgtest "$MSG" "$*" + fi + $* 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail } testequalor2() { |