72c6b7f91e9f159d1414411556c1e44e98264a38
[mmh] / test / inc / test-deb359167
1 #!/bin/sh
2 # Test a variant of a mailbox which caused debian bug 359167.
3 set -e
4
5 . ${MH_TEST_COMMON}
6
7 setup_test
8
9 THISDIR="${srcdir}/test/inc"
10
11 require_prog valgrind
12
13 TESTMBOX="$THISDIR/deb359167.mbox"
14
15 if [ "$(output_md5 "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then 
16   echo "Test mailbox has been corrupted"
17   exit 1
18 fi
19
20 #
21 # valgrind refuses to run on a setuid/setgid program, so chmod inc so it
22 # isn't (just in case)
23 #
24
25 chmod 755 ${MH_INST_DIR}${bindir}/inc
26
27 valgrind --error-exitcode=1 --quiet inc -silent -file "$TESTMBOX"