]> diplodocus.org Git - nmh/blobdiff - test/rcv/test-rcvtty
Support mhparam -debug along with -all.
[nmh] / test / rcv / test-rcvtty
index 6d61de212d4eae8633561d07424d90146c873378..a2cf6ca63728e56ba1b601f72515e6e372daaafd 100755 (executable)
@@ -17,7 +17,9 @@ fi
 setup_test
 
 # Use proper program, likely not the first one on PATH.
 setup_test
 
 # Use proper program, likely not the first one on PATH.
-rcvtty="${MH_LIB_DIR}/rcvtty"
+rcvtty="${MH_LIBEXEC_DIR}/rcvtty"
+
+check_exit '-eq 1' $rcvtty -
 
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
@@ -37,13 +39,14 @@ Usage: rcvtty [command ...]
   -help
 EOF
 
   -help
 EOF
 
-$rcvtty -help >"$actual" 2>&1
+#### Skip nmh intro text.
+run_prog "$rcvtty" -help | sed '/^$/,$d' >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version
 case `$rcvtty -v` in
   rcvtty\ --*) ;;
 check "$expected" "$actual"
 
 # check -version
 case `$rcvtty -v` in
   rcvtty\ --*) ;;
-  *          ) printf "$0: rcvtty -v generated unexpected output\n" >&2
+  *          ) printf '%s: rcvtty -v generated unexpected output\n' "$0" >&2
                failed=`expr ${failed:-0} + 1`;;
 esac
 
                failed=`expr ${failed:-0} + 1`;;
 esac
 
@@ -54,7 +57,7 @@ esac
 # any of their ttys.
 cat >"$expected" <<EOF
 EOF
 # any of their ttys.
 cat >"$expected" <<EOF
 EOF
-$rcvtty <${MH_TEST_DIR}/Mail/inbox/1 -biff >"$actual" 2>&1
+run_prog $rcvtty <${MH_TEST_DIR}/Mail/inbox/1 -biff >"$actual" 2>&1
 check "$expected" "$actual"
 
 
 check "$expected" "$actual"