From 7414af7fa88164209eec9c585b8d175c1618ecbc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Sep 2015 10:35:49 +0200 Subject: various changes to increase test-coverage And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore --- test/integration/framework | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'test/integration/framework') diff --git a/test/integration/framework b/test/integration/framework index 3bf6012ba..322c74a21 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1592,29 +1592,30 @@ testfailure() { msggroup } -testsuccessequal() { - msggroup 'testsuccessequal' - local CMP="$1" - shift - testsuccess "$@" - testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" "$CMP" +testreturnstateequal() { + local STATE="$1" + msggroup "${STATE}equal" + if [ "$2" != '--nomsg' ]; then + local CMP="$2" + shift 2 + "$STATE" "$@" + testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/${STATE}.output" "$CMP" + else + local CMP="$3" + shift 3 + "$STATE" --nomsg "$@" + testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/${STATE}.output" "$CMP" + fi msggroup } +testsuccessequal() { + testreturnstateequal 'testsuccess' "$@" +} testwarningequal() { - msggroup 'testwarningequal' - local CMP="$1" - shift - testwarning "$@" - testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarning.output" "$CMP" - msggroup + testreturnstateequal 'testwarning' "$@" } testfailureequal() { - msggroup 'testfailureequal' - local CMP="$1" - shift - testfailure "$@" - testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" "$CMP" - msggroup + testreturnstateequal 'testfailure' "$@" } testfailuremsg() { -- cgit v1.2.3