2 ######################################################
6 ######################################################
13 runandcheck "mhparam -help" <<!
14 Usage: mhparam [profile-components] [switches]
26 * ) echo "$0: mhparam -v generated unexpected output" 1>&2
27 failed=`expr ${failed:-0} + 1`;;
30 # check unknown option
31 runandcheck 'mhparam -nonexistent' <<!
32 mhparam: -nonexistent unknown
36 cp "$MMH/profile" "$MMH/profile2"
41 # -all adds current folder
42 runandcheck "mhparam -all" <<!
43 Path: $MH_TEST_DIR/Mail
49 # check -all with a component
50 runandcheck "mhparam -all path >/dev/null" <<!
51 mhparam: profile-components ignored with -all
54 # check -all with -components
55 runandcheck "mhparam -all -components >/dev/null" <<!
56 mhparam: -components ignored with -all
60 runandcheck 'mhparam path' <<!
64 # check more than one component, which enables -component
65 echo 'AliasFile: aliases' >>"$MMHP"
66 runandcheck 'mhparam path AliasFile' <<!
67 path: $MH_TEST_DIR/Mail
72 #### This exits with non-zero status, so let runandcheck squash that:
73 runandcheck 'mhparam formatproc rmmproc' <<!
78 runandcheck 'mhparam -component Path' <<!
79 Path: $MH_TEST_DIR/Mail
82 # check -component, note that component name of argument is echoed exactly
83 runandcheck 'mhparam -component path' <<!
84 path: $MH_TEST_DIR/Mail
86 runandcheck 'mhparam -component PATH' <<!
87 PATH: $MH_TEST_DIR/Mail
91 runandcheck 'mhparam -component -nocomponent path' <<!
94 runandcheck 'mhparam -nocomponent path AliasFile' <<!
100 # check nonexistent component
101 runandcheck 'mhparam nonexistent' <<!
105 # check that return status counts nonexistent components
106 runandcheck "mhparam path context nonexistent1 nonexistent2 \
107 nonexistent3 >/dev/null; echo \$?" <<!
110 # check that return status counts nonexistent components
111 runandcheck "mhparam path context nonexistent1 nonexistent2 \
112 nonexistent3 inbox >/dev/null; echo \$?" <<!
117 # Some of its output depends on configure options, so don't bother to
118 # check for correctness here.
119 runandcheck "mhparam -debug >/dev/null; echo \$?" <<!
123 # check with text file that does not end with newline
124 printf 'Editor: emacs' >>"$MMHP"
125 runandcheck 'mhparam -nocomponent editor' <<!
132 # FIXME: needs to be adjusted or removed ...
134 # check each component in procs array in uip/mhparam.c
135 # The tests don't override these, so they're default or configured values.
136 # Note that cat is hardcoded here because the testsuite uses it for moreproc.
138 runandcheck "mhparam -nocomponent \
164 $MH_INST_DIR$bindir/mhbuild
165 $MH_INST_DIR$bindir/refile
169 $MH_INST_DIR$bindir/mhmail
170 $MH_INST_DIR$nmhlibexecdir/mhl
174 $MH_INST_DIR$nmhlibexecdir/post
175 $MH_INST_DIR$bindir/send
176 $MH_INST_DIR$bindir/mhshow
177 $MH_INST_DIR$nmhlibexecdir/mhl
178 nmh-`cat ${srcdir}/VERSION`
179 $MH_INST_DIR$bindir/whatnow
180 $MH_INST_DIR$bindir/whom