Description: Added test of Dcc: with sendmail/pipe. Also, fixed test/fakesendmail to break with Bcc: using sendmail/pipe before Alexander Zangerl's fix. Author: David Levine --- a/test/fakesendmail +++ b/test/fakesendmail @@ -46,3 +46 @@ else - - #### This will delete any lines in the message body that start with Bcc:! - sed -e '/^[Bb][Cc][Cc]:/d' | $deliver + $deliver --- a/test/post/test-mts +++ b/test/post/test-mts @@ -42,0 +43 @@ EOF +start_test 'invalid -mts selection' @@ -59,0 +61 @@ test_sendmail () + send_status=$? @@ -63,3 +65,5 @@ test_sendmail () - mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox - inc -silent -file "$mbox" - rm -f "$mbox" + if [ $send_status -eq 0 ]; then + mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox + inc -silent -file "$mbox" + rm -f "$mbox" + fi @@ -85,0 +90 @@ test_sendmail () +start_test '-mts sendmail/smtp' @@ -111,0 +117 @@ test_sendmail sendmail/smtp "${testname}.expected" +start_test '-mts sendmail/pipe' @@ -135 +141,2 @@ test_sendmail sendmail/pipe "${testname}.expected" -# check Bcc +# check Bcc with sendmail/pipe +start_test 'Bcc with sendmail/pipe' @@ -161,0 +169 @@ Subject: Test +BCC: address@hidden @@ -180,0 +189,18 @@ test_sendmail sendmail/pipe "${testname}.expected1" "${testname}.expected2" +# check Dcc with sendmail/pipe: it is unsupported +start_test 'Dcc with sendmail/pipe' +cat > "${MH_TEST_DIR}/Mail/draft" < "${testname}.expected1" <"${testname}.actual1" || true +check "${testname}.actual1" "${testname}.expected1" + @@ -182,0 +209 @@ rm -f ${MHMTSCONF} +finish_test --