From: Adam Wolfe Gordon Date: Sun, 1 Apr 2012 15:24:20 +0000 (-0600) Subject: test: Tests for reply from alternate addresses in emacs X-Git-Tag: 0.13_rc1~104 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=b45b72aa14394ba346a958da7a74303951b41ed4;p=obsolete%2Fnotmuch-old test: Tests for reply from alternate addresses in emacs Since the recent reply changes were pushed, there has been a bug that causes emacs to always reply from the primary address, even if the JSON or default CLI reply output uses an alternate address. This adds two tests to the emacs test library based on the two "Reply form..." tests in the reply test library. One is currently marked broken. --- diff --git a/test/emacs b/test/emacs index 8b92d0a9..576bc1f0 100755 --- a/test/emacs +++ b/test/emacs @@ -285,6 +285,50 @@ Notmuch Test Suite writes: EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Reply from alternate address within emacs" +test_subtest_known_broken +add_message '[from]="Sender "' \ + [to]=test_suite_other@notmuchmail.org + +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\") + (notmuch-test-wait) + (notmuch-search-reply-to-thread) + (test-output)" +cat <EXPECTED +From: Notmuch Test Suite +To: Sender +Subject: Re: ${test_subtest_name} +In-Reply-To: <${gen_msg_id}> +Fcc: ${MAIL_DIR}/sent +--text follows this line-- +Sender writes: + +> This is just a test message (#${gen_msg_cnt}) +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Reply from address in named group list within emacs" +add_message '[from]="Sender "' \ + '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \ + [cc]=test_suite_other@notmuchmail.org + +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\") + (notmuch-test-wait) + (notmuch-search-reply-to-thread) + (test-output)" +cat <EXPECTED +From: Notmuch Test Suite +To: Sender , someone@example.com +Subject: Re: ${test_subtest_name} +In-Reply-To: <${gen_msg_id}> +Fcc: ${MAIL_DIR}/sent +--text follows this line-- +Sender writes: + +> This is just a test message (#${gen_msg_cnt}) +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Reply within emacs to a multipart/mixed message" test_emacs '(notmuch-show "id:20091118002059.067214ed@hikari") (notmuch-show-reply)