[BUG/PATCH 1/2] test: Tests for reply from alternate addresses in emacs

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Mon Mar 26 10:01:50 PDT 2012


Adam Wolfe Gordon <awg+notmuch at xvx.ca> writes:
> 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.
> ---
>  test/emacs |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 52 insertions(+), 0 deletions(-)
>
> diff --git a/test/emacs b/test/emacs
> index 8a28705..fa5d706 100755
> --- a/test/emacs
> +++ b/test/emacs
> @@ -274,6 +274,58 @@ Notmuch Test Suite <test_suite at notmuchmail.org> 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 <sender at example.com>"' \
> +	     [to]=test_suite_other at notmuchmail.org \
> +	     [subject]=notmuch-reply-test \
> +	    '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
> +	    '[body]="reply from alternate address"'

Please remove subject, data and body parameters.  add_message would
provide sane default values.

> +
> +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
> +	    (notmuch-test-wait)
> +	    (notmuch-search-reply-to-thread)
> +	    (test-output)"
> +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT
> +cat <<EOF >EXPECTED
> +From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
> +To: Sender <sender at example.com>
> +Subject: Re: notmuch-reply-test
> +In-Reply-To: <XXX>
> +Fcc: ${MAIL_DIR}/sent
> +--text follows this line--
> +Sender <sender at example.com> writes:
> +
> +> reply from alternate address
> +EOF
> +test_expect_equal_file OUTPUT EXPECTED
> +
> +test_begin_subtest "Reply from address in named group list within emacs"
> +add_message '[from]="Sender <sender at example.com>"' \
> +            '[to]=group:test_suite at notmuchmail.org,someone at example.com\;' \
> +             [cc]=test_suite_other at notmuchmail.org \
> +             [subject]=notmuch-reply-test \
> +            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
> +            '[body]="Reply from address in named group list"'

Same here.

Regards,
  Dmitry

> +
> +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
> +	    (notmuch-test-wait)
> +	    (notmuch-search-reply-to-thread)
> +	    (test-output)"
> +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT
> +cat <<EOF >EXPECTED
> +From: Notmuch Test Suite <test_suite at notmuchmail.org>
> +To: Sender <sender at example.com>, someone at example.com
> +Subject: Re: notmuch-reply-test
> +In-Reply-To: <XXX>
> +Fcc: ${MAIL_DIR}/sent
> +--text follows this line--
> +Sender <sender at example.com> writes:
> +
> +> Reply from address in named group list
> +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 at hikari")
>  		(notmuch-show-reply)
> -- 
> 1.7.5.4
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list