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