5 [ $# -eq 1 ] || echo "usage: $0 "'<testname>'
7 # Get full pathnames that we'll need.
10 export MH_TEST_DIR=`pwd`/testinstall
11 export MH=$MH_TEST_DIR/Mail/.mh_profile
12 export PATH=$MH_TEST_DIR/bin:$PATH
13 export MH_TEST_COMMON=$PWD/common.sh
15 #### Some tests use mhshow to display headers. It relies on mhl's
16 #### default mhl.headers, which runs the date through the pretty
17 #### function. That displays the date with the user's current
18 #### timezone. All of the tests expect GMT, so fool them into using
22 [ -d $MH_TEST_DIR ] || ./setup-test
25 trap "rm -rf $MH_TEST_DIR/Mail; exit \$status" 0
27 rm -rf $MH_TEST_DIR/Mail
28 mkdir $MH_TEST_DIR/Mail
29 echo "Path: $MH_TEST_DIR/Mail" > $MH
30 folder -create +inbox > /dev/null
31 # create 10 basic messages
34 cat > $MH_TEST_DIR/Mail/inbox/$i <<EOF
35 From: Test$i <test$i@example.com>
36 To: Some User <user@example.com>
37 Date: Fri, 29 Sep 2006 00:00:00
38 Subject: Testing message $i
40 This is message number $i
50 if [ $return_value -eq 0 ]; then
53 elif [ $return_value -eq 120 ]; then
54 # indicates test was skipped (eg needed program not found)
55 # test itself should have printed a message about this,
56 # so print nothing here.