setup_test
+check_exit '-eq 1' mhparam -
+check_exit '-eq 0' mhparam localmbox
+
expected=$MH_TEST_DIR/$$.expected
expected_err=$MH_TEST_DIR/$$.expected_err
actual=$MH_TEST_DIR/$$.actual
EOF
#### Skip nmh intro text.
-mhparam -help | sed '/^$/Q' >"$actual" 2>&1
+mhparam -help | sed '/^$/,$d' >"$actual" 2>&1
check "$expected" "$actual"
# check -version
# check -all
cp "$MH" $expected
-# -all adds current folder
+# -all adds current folder and Version
echo 'Current-Folder: '`folder -f` >>$expected
+echo "Version: nmh-$MH_VERSION" >>$expected
run_prog mhparam -all >$actual
check $expected $actual 'keep first'
$MH_INST_DIR$bindir/send
$MH_INST_DIR$bindir/mhshow
$MH_INST_DIR$nmhlibexecdir/mhl
-nmh-`cat ${srcdir}/VERSION`
+nmh-$MH_VERSION
$MH_INST_DIR$bindir/whatnow
$MH_INST_DIR$bindir/whom
$nmhetcdirinst
run_test "echo $?" 3
set -e
+# And clips their numbers to avoid a misleading exit value.
+while read use want; do
+ r=0
+ mhparam `yes nonexistent | sed ${use}q` || r=$?
+ run_test "echo $r" $want
+done <<\E
+119 119
+120 120
+121 120
+E
+
# mhparam -debug
# Some of its output depends on configure options, so don't bother to
# check for correctness here.