]>
diplodocus.org Git - nmh/blob - test/runtest
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 [ -d $MH_TEST_DIR ] || .
/setup
-test
18 trap "rm -rf $MH_TEST_DIR/Mail; exit \$status" 0
20 rm -rf $MH_TEST_DIR/Mail
21 mkdir $MH_TEST_DIR/Mail
22 echo "Path: $MH_TEST_DIR/Mail" > $MH
23 folder
-create +inbox
> /dev
/null
24 # create 10 basic messages
27 cat > $MH_TEST_DIR/Mail
/inbox
/$i <<EOF
28 From: Test$i <test$i@example.com>
29 To: Some User <user@example.com>
30 Date: Fri, 29 Sep 2006 00:00:00
31 Subject: Testing message $i
33 This is message number $i
43 if [ $return_value -eq 0 ]; then
46 elif [ $return_value -eq 120 ]; then
47 # indicates test was skipped (eg needed program not found)
48 # test itself should have printed a message about this,
49 # so print nothing here.