X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b4f2851d40874160fbe4c5ce288ae2e7fd8fbb4b..7540f02725475698a47046ebf4e55b3e8dea5ab6:/test/mhmail/test-mhmail diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 043d95ef..c3969578 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -68,6 +68,7 @@ actual_err=$MH_TEST_DIR/test-mhmail$$.actual_err # check -help +start_test "-help" # Verified behavior consistent with compiled sendmail. cat >$expected <$actual 2>&1 -check $expected $actual +#### Skip nmh intro text. +mhmail -help 2>&1 | sed '/^$/,$d' >"$actual" +check "$expected" "$actual" # check -version +start_test "-version" # Verified same behavior as compiled mhmail. case `mhmail -v` in mhmail\ --*) ;; @@ -101,6 +104,7 @@ case `mhmail -v` in esac # check for missing argument to switches that require them +start_test "for missing argument to switches that require them" for switch in attach body cc from headerfield subject to; do run_test "mhmail recipient -$switch" \ "mhmail: missing argument to -$switch" @@ -116,6 +120,7 @@ done # check with no switches +start_test "with no switches" # That will just run inc, which we don't want to do anything, # so tell inc to just display its version. # Verified same behavior as compiled mhmail. @@ -128,6 +133,7 @@ esac # check -nosend +start_test "-nosend" # Not supported by compiled mhmail. mhmail -nosend recipient@example.com -from sender1@localhost \ -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err" @@ -148,6 +154,7 @@ check "$expected_err" "$actual_err" # check -send +start_test "-send" # Not supported by compiled mhmail. cat > "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < DATA To: recipient@example.com From: sender8@localhost +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" Date: Message-ID: @@ -305,6 +320,7 @@ test_mhmail "$expected" '-from sender8@localhost -profile' '|' message # check repeated -from and -subject switches +start_test "repeated -from and -subject switches" # Verified same behavior as compiled mhmail. cat > "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" < "$expected" <