notmuch-test: Test "notmuch reply" with a reply-to-munged mail
authorCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:08:13 +0000 (12:08 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:42:03 +0000 (12:42 -0800)
This is a test for the recently added feature where we detect that the
reply-to address already exists in the To: or Cc: header so will
already be replied to. In this case we want to include the From:
address in our reply, (where, otherwise we would use the Reply-To
address *instead* of the address in the From header).

test/notmuch-test

index 0488b67a51ee02abbbcd47fa1926c630fd170d03..33218d24483688756abd800393376412b4586f18 100755 (executable)
@@ -395,6 +395,25 @@ References:  <${gen_msg_id}>
 On Tue, 05 Jan 2010 15:43:56 -0800, Sender <sender@example.com> wrote:
 > support for reply-to"
 
 On Tue, 05 Jan 2010 15:43:56 -0800, Sender <sender@example.com> wrote:
 > support for reply-to"
 
+printf " Un-munging Reply-To...\t\t"
+generate_message '[from]="Sender <sender@example.com>"' \
+                 '[to]="Some List <list@example.com>"' \
+                 [subject]=notmuch-reply-test \
+                 '[date]="Tue, 05 Jan 2010 15:43:56 -0800"' \
+                 '[body]="Un-munging Reply-To"' \
+                 '[reply-to]="Evil Munging List <list@example.com>"'
+
+$NOTMUCH new > /dev/null
+execute_expecting "reply id:${gen_msg_id}" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
+Subject: Re: notmuch-reply-test
+To: Sender <sender@example.com>, Some List <list@example.com>
+Bcc: test_suite@notmuchmail.org
+In-Reply-To: <${gen_msg_id}>
+References:  <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0800, Sender <sender@example.com> wrote:
+> Un-munging Reply-To"
+
 cat <<EOF
 Notmuch test suite complete.
 
 cat <<EOF
 Notmuch test suite complete.