]> diplodocus.org Git - nmh/blob - test/inc/test-deb359167
forw.man, mh-mime.man: Add missing commas in `SEE ALSO' list.
[nmh] / test / inc / test-deb359167
1 #!/bin/sh
2 # Test a variant of a mailbox which caused debian bug 359167.
3 set -e
4
5 if test -z "${MH_OBJ_DIR}"; then
6 srcdir=`dirname "$0"`/../..
7 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
8 fi
9
10 . "$MH_OBJ_DIR/test/common.sh"
11
12 setup_test
13
14 # valgrind throws a strange error on FreeBSD >= 10; skip the test
15 # for now while we try to track down the underlying cause.
16 if [ `uname -s` = 'FreeBSD' ]; then
17 case `uname -r` in
18 1?.*) test_skip 'valgrind fails on FreeBSD >= 10' ;;
19 esac
20 fi
21
22 require_prog valgrind
23
24 THISDIR="$srcdir/test/inc"
25 TESTMBOX="$THISDIR/deb359167.mbox"
26
27 if [ "`output_md5 "$TESTMBOX"`" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then
28 echo "Test mailbox has been corrupted"
29 exit 1
30 fi
31
32 #
33 # valgrind refuses to run on a setuid/setgid program, so chmod inc so it
34 # isn't (just in case)
35 #
36
37 chmod 755 ${MH_INST_DIR}${bindir}/inc
38
39 valgrind --error-exitcode=1 --quiet --suppressions="${srcdir}/test/valgrind.supp" inc -silent -file "$TESTMBOX"