X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6106441685a38400d9aa94ccb7218218102f941c..afb68522438886ed22cbc1433da165db74d5baa1:/test/inc/test-deb359167 diff --git a/test/inc/test-deb359167 b/test/inc/test-deb359167 index 26aea11d..92f4c61a 100755 --- a/test/inc/test-deb359167 +++ b/test/inc/test-deb359167 @@ -2,19 +2,30 @@ # Test a variant of a mailbox which caused debian bug 359167. set -e -. ${MH_TEST_COMMON} +if test -z "${MH_OBJ_DIR}"; then + srcdir=`dirname "$0"`/../.. + MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi -setup_test +. "$MH_OBJ_DIR/test/common.sh" -THISDIR="${srcdir}/test/inc" +setup_test require_prog valgrind +THISDIR="$srcdir/test/inc" TESTMBOX="$THISDIR/deb359167.mbox" -if [ "$(${MD5SUM} "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then - echo "Test mailbox has been corrupted" - exit 1 +if [ "`output_md5 "$TESTMBOX"`" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then + echo "Test mailbox has been corrupted" + exit 1 fi +# +# valgrind refuses to run on a setuid/setgid program, so chmod inc so it +# isn't (just in case) +# + +chmod 755 ${MH_INST_DIR}${bindir}/inc + valgrind --error-exitcode=1 --quiet inc -silent -file "$TESTMBOX"