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 folded header
125 Alternate-Mailboxes: alice@example.org,
129 runandcheck 'mhparam alternate-mailboxes' <<!
130 alice@example.org, bob@example.net, charly@example.comp
134 # check with text file that does not end with newline
135 # in mmh this is invalid
136 printf 'Editor: emacs' >>"$MMHP"
138 runandcheck 'mhparam -nocomponent editor' <<!
139 mhparam: `cat test-temp-dir`/.mmh/profile2 is poorly formatted
147 # FIXME: needs to be adjusted or removed ...
149 # check each component in procs array in uip/mhparam.c
150 # The tests don't override these, so they're default or configured values.
151 # Note that cat is hardcoded here because the testsuite uses it for moreproc.
153 runandcheck "mhparam -nocomponent \
179 $MH_INST_DIR$bindir/mhbuild
180 $MH_INST_DIR$bindir/refile
184 $MH_INST_DIR$bindir/mhmail
185 $MH_INST_DIR$nmhlibexecdir/mhl
189 $MH_INST_DIR$nmhlibexecdir/post
190 $MH_INST_DIR$bindir/send
191 $MH_INST_DIR$bindir/mhshow
192 $MH_INST_DIR$nmhlibexecdir/mhl
193 nmh-`cat ${srcdir}/VERSION`
194 $MH_INST_DIR$bindir/whatnow
195 $MH_INST_DIR$bindir/whom