X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fmhmail%2Ftest-mhmail;h=fdb361758136a5a44bd1c5031d5c77d538075eb3;hb=d8c7d4f2c785d35cebd5ea64213a335561a57f7d;hp=80e95c5cabe7d427912366dd3d043bac6980c8bf;hpb=8239546c65444333a91dcce8da55de6425ba96ec;p=mmh diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 80e95c5..fdb3617 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -57,8 +57,7 @@ test_mhmail () sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ - -e 's/^Message-ID:.*/Message-ID:/' \ - -e 's/^Content-ID:.*/Content-ID:/' "$actual" > "$actual".nodate + -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate rm -f "$actual" check "$actual".nodate "$1" @@ -73,7 +72,7 @@ actual_err=$MH_TEST_DIR/test-mhmail$$.actual_err # check -help # Verified behavior consistent with compiled sendmail. cat >$expected <$actual 2>&1 @@ -103,21 +103,21 @@ case `mhmail -v` in esac # check for missing argument to switches that require them -for switch in attach body cc from headerfield subject; do +for switch in attach body cc from headerfield subject to; do run_test "mhmail recipient -$switch" \ "mhmail: missing argument to -$switch" done -for switch in attach body cc from headerfield subject; do +for switch in attach body cc from headerfield subject to; do run_test "mhmail recipient -$switch -nosend" \ "mhmail: missing argument to -$switch" done -for switch in attach body cc from headerfield subject; do +for switch in attach body cc from headerfield subject to; do run_test "mhmail recipient -$switch -server 127.0.0.1" \ "mhmail: missing argument to -$switch" done -# check with no arguments +# check 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. @@ -308,7 +308,7 @@ test_mhmail "$expected" '-from sender@localhost -profile' '|' message [ ${failed:-0} -eq 0 ] || exit ${failed:-0} -# check repeated -from and -subject arguments +# check repeated -from and -subject switches # Verified same behavior as compiled mhmail. cat > "$expected" < "$expected" < "$expected" < "$expected" < +RCPT TO: +RCPT TO: +RCPT TO: +DATA +To: recipient@example.com, recipient2@example.com +Cc: cc1@example.com +Subject: Test +From: sender@localhost +Date: + +message +. +QUIT +EOF + +test_mhmail "$expected" \ + "-from sender@localhost -cc cc1@example.com -subject Test \ + -to recipient2@example.com" \ + -b message +[ ${failed:-0} -eq 0 ] || exit ${failed:-0} + + # check with no newline on stdin # Shows different behavior than compiled mhmail, which was silent in this case. cat > "$expected" <