]>
diplodocus.org Git - nmh/blob - test/install-mh/test-install-mh
2 ######################################################
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname $0`/..
/..
12 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
15 .
"$MH_OBJ_DIR/test/common.sh"
19 check_exit
'-eq 1' install-mh - # gcov
21 # check with no options, with nmh already installed
22 run_test
"install-mh" \
23 'install-mh: You already have an nmh profile, use an editor to modify it'
25 # check -auto, with nmh already installed
26 run_test
"install-mh -auto" 'install-mh: invocation error'
28 # check -check, with nmh already installed
29 run_test
"install-mh -check" ''
30 # make sure exit status is 0
31 run_prog
install-mh -check
32 run_test
"echo $?" '0'
34 # Remove the nmh installation so that install-mh can install.
35 rm -rf $MH_TEST_DIR/Mail
37 # check -check, with nmh not installed
38 run_test
"install-mh -check" ''
39 # make sure exit status is 1
41 run_prog
install-mh -check
42 run_test
"echo $?" '1'
45 # check with no options, with nmh not installed. Use canned
46 # responses to install.
47 installpath
=`echo $MH_TEST_DIR/Mail | sed 's%^/%%'`
52 y" | run_prog
install-mh >/dev
/null
54 if [ -f $MH_TEST_DIR/Mail
/context
-a -f "$MH" ]; then
55 run_prog
install-mh -check
57 failed
=`expr ${failed:-0} + 1`
60 # Remove the nmh installation so that install-mh -auto can install.
61 # And set HOME to that it installs in the test directory:
62 # install-mh -auto does a chdir($HOME).
63 rm -rf $MH_TEST_DIR/Mail
64 HOME
=$MH_TEST_DIR install-mh -auto >/dev
/null
66 if [ -f $MH_TEST_DIR/Mail
/context
-a -f "$MH" ]; then
67 run_prog
install-mh -check
69 failed
=`expr ${failed:-0} + 1`