]> diplodocus.org Git - nmh/blobdiff - test/rcv/test-rcvtty
Update XOAUTH2 documentation.
[nmh] / test / rcv / test-rcvtty
index f0e6558f02bd44f74ad74aaec3383ab6dc4917e0..d86b8dbf606bbf5b3b822450b57446d08ac2e147 100755 (executable)
@@ -19,11 +19,14 @@ setup_test
 # Use proper program, likely not the first one on PATH.
 rcvtty="${MH_LIBEXEC_DIR}/rcvtty"
 
+check_exit '-eq 1' $rcvtty -
+
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: rcvtty [command ...]
   switches are:
@@ -37,10 +40,12 @@ Usage: rcvtty [command ...]
   -help
 EOF
 
-run_prog $rcvtty -help >"$actual" 2>&1
+#### Skip nmh intro text.
+run_prog "$rcvtty" -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$rcvtty -v` in
   rcvtty\ --*) ;;
   *          ) printf '%s: rcvtty -v generated unexpected output\n' "$0" >&2
@@ -48,6 +53,7 @@ case `$rcvtty -v` in
 esac
 
 # check normal operation.  Use -biff to avoid sending notification to
+start_test "normal operation.  Use -biff to avoid sending notification to"
 # each of the user's terminals.  So this command shouldn't do
 # anything.  It will write the notification(s) if the user actually
 # has actually enabled biff notification, or has set the exec bit of
@@ -58,4 +64,5 @@ run_prog $rcvtty <${MH_TEST_DIR}/Mail/inbox/1 -biff >"$actual" 2>&1
 check "$expected" "$actual"
 
 
+finish_test
 exit ${failed:-0}