]>
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 with no options, with nmh already installed
20 run_test
"install-mh" \
21 'install-mh: You already have an nmh profile, use an editor to modify it'
23 # check -auto, with nmh already installed
24 run_test
"install-mh -auto" 'install-mh: invocation error'
26 # check -check, with nmh already installed
27 run_test
"install-mh -check" ''
28 # make sure exit status is 0
29 run_prog
install-mh -check
30 run_test
"echo $?" '0'
32 # Remove the nmh installation so that install-mh can install.
33 rm -rf $MH_TEST_DIR/Mail
35 # check -check, with nmh not installed
36 run_test
"install-mh -check" ''
37 # make sure exit status is 1
39 run_prog
install-mh -check
40 run_test
"echo $?" '1'
43 # check with no options, with nmh not installed. Use canned
44 # responses to install.
45 installpath
=`echo $MH_TEST_DIR/Mail | sed 's%^/%%'`
50 y" | run_prog
install-mh >/dev
/null
52 if [ -f $MH_TEST_DIR/Mail
/context
-a -f $MH_TEST_DIR/Mail
/.mh_profile
]; then
53 run_prog
install-mh -check
55 failed
=`expr ${failed:-0} + 1`
58 # Remove the nmh installation so that install-mh -auto can install.
59 # And set HOME to that it installs in the test directory:
60 # install-mh -auto does a chdir($HOME).
61 rm -rf $MH_TEST_DIR/Mail
62 HOME
=$MH_TEST_DIR install-mh -auto >/dev
/null
64 if [ -f $MH_TEST_DIR/Mail
/context
-a -f $MH_TEST_DIR/Mail
/.mh_profile
]; then
65 run_prog
install-mh -check
67 failed
=`expr ${failed:-0} + 1`