[PATCH 4/4] add tests for reply-to-sender
authorMark Walters <markwalters1009@gmail.com>
Fri, 6 Jan 2012 13:34:17 +0000 (13:34 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:40 +0000 (09:41 -0800)
8a/a8e426e8487afe3b93b50146e282f6c3379efb [new file with mode: 0644]

diff --git a/8a/a8e426e8487afe3b93b50146e282f6c3379efb b/8a/a8e426e8487afe3b93b50146e282f6c3379efb
new file mode 100644 (file)
index 0000000..c809984
--- /dev/null
@@ -0,0 +1,295 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id EE8064044F5\r
+       for <notmuch@notmuchmail.org>; Fri,  6 Jan 2012 05:34:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Rl3dR9yAy40B for <notmuch@notmuchmail.org>;\r
+       Fri,  6 Jan 2012 05:34:31 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id CB5614044C1\r
+       for <notmuch@notmuchmail.org>; Fri,  6 Jan 2012 05:34:30 -0800 (PST)\r
+Received: by mail-we0-f181.google.com with SMTP id m12so1311441wer.26\r
+       for <notmuch@notmuchmail.org>; Fri, 06 Jan 2012 05:34:30 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=jqbSuEvjySA7cF4c5lA8iSYAfiaMDYCljiXMWH7oMxI=;\r
+       b=CEvGEpWjRi2vMVgnzsaFzL6Vdax7RapFp60yBjCsBnMBwuGx2/3WmDZfzp6hYi6ACi\r
+       QGVokEDkQtpfhzt5BIrWHb9mS11BuXgFMeRrbJI3xiLKs5zLtZkbqyBl9xjd075ybVoG\r
+       MRkmqAsnPj/Y3T5D1h2BlVnC6oXRflA5pfZKc=\r
+Received: by 10.216.135.75 with SMTP id t53mr2973856wei.2.1325856870474;\r
+       Fri, 06 Jan 2012 05:34:30 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ q5sm19561842wbo.8.2012.01.06.05.34.28 (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Fri, 06 Jan 2012 05:34:29 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org, david@tethera.net\r
+Subject: [PATCH 4/4] add tests for reply-to-sender\r
+Date: Fri,  6 Jan 2012 13:34:17 +0000\r
+Message-Id: <1325856857-15969-4-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <8739btdkir.fsf@qmul.ac.uk>\r
+References: <8739btdkir.fsf@qmul.ac.uk>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 06 Jan 2012 13:34:32 -0000\r
+\r
+---\r
+ test/notmuch-test    |    1 +\r
+ test/reply-to-sender |  209 ++++++++++++++++++++++++++++++++++++++++++++++++++\r
+ 2 files changed, 210 insertions(+), 0 deletions(-)\r
+ create mode 100755 test/reply-to-sender\r
+\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index e40ef86..6a99ae3 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -33,6 +33,7 @@ TESTS="\r
+   thread-naming\r
+   raw\r
+   reply\r
++  reply-to-sender\r
+   dump-restore\r
+   uuencode\r
+   thread-order\r
+diff --git a/test/reply-to-sender b/test/reply-to-sender\r
+new file mode 100755\r
+index 0000000..c7d15bb\r
+--- /dev/null\r
++++ b/test/reply-to-sender\r
+@@ -0,0 +1,209 @@\r
++#!/usr/bin/env bash\r
++test_description="\"notmuch reply --reply-to=sender\" in several variations"\r
++. ./test-lib.sh\r
++\r
++test_begin_subtest "Basic reply-to-sender"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++             [to]=test_suite@notmuchmail.org \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="basic reply-to-sender test"'\r
++\r
++output=$(notmuch reply --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <sender@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> basic reply-to-sender test"\r
++\r
++test_begin_subtest "From Us, Basic reply to message"\r
++add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \\r
++            '[to]="Recipient <recipient@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="basic reply-to-from-us test"'\r
++\r
++output=$(notmuch reply --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Recipient <recipient@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> basic reply-to-from-us test"\r
++\r
++test_begin_subtest "Multiple recipients"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++            '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="Multiple recipients"'\r
++\r
++output=$(notmuch reply  --reply-to=sender  id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <sender@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> Multiple recipients"\r
++\r
++test_begin_subtest "From Us, Multiple TO recipients"\r
++add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \\r
++            '[to]="Recipient <recipient@example.com>, Someone Else <someone@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="From Us, Multiple TO recipients"'\r
++\r
++output=$(notmuch reply  --reply-to=sender  id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Recipient <recipient@example.com>, Someone Else <someone@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> From Us, Multiple TO recipients"\r
++\r
++test_begin_subtest "Reply with CC"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++             [to]=test_suite@notmuchmail.org \\r
++            '[cc]="Other Parties <cc@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="reply with CC"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <sender@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> reply with CC"\r
++\r
++test_begin_subtest "From Us, Reply with CC"\r
++add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \\r
++            '[to]="Recipient <recipient@example.com>"' \\r
++            '[cc]="Other Parties <cc@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="reply with CC"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Recipient <recipient@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> reply with CC"\r
++\r
++test_begin_subtest "From Us, Reply no TO but with CC"\r
++add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \\r
++            '[cc]="Other Parties <cc@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="reply with CC"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++Cc: Other Parties <cc@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> reply with CC"\r
++\r
++test_begin_subtest "Reply from alternate address"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++             [to]=test_suite_other@notmuchmail.org \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="reply from alternate address"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <sender@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> reply from alternate address"\r
++\r
++test_begin_subtest "Support for Reply-To"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++             [to]=test_suite@notmuchmail.org \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="support for reply-to"' \\r
++            '[reply-to]="Sender <elsewhere@example.com>"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <elsewhere@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> support for reply-to"\r
++\r
++test_begin_subtest "Support for Reply-To with multiple recipients"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++            '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="support for reply-to with multiple recipients"' \\r
++            '[reply-to]="Sender <elsewhere@example.com>"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <elsewhere@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> support for reply-to with multiple recipients"\r
++\r
++test_begin_subtest "Un-munging Reply-To"\r
++add_message '[from]="Sender <sender@example.com>"' \\r
++            '[to]="Some List <list@example.com>"' \\r
++             [subject]=notmuch-reply-test \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="Un-munging Reply-To"' \\r
++            '[reply-to]="Evil Munging List <list@example.com>"'\r
++\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: notmuch-reply-test\r
++To: Sender <sender@example.com>\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
++> Un-munging Reply-To"\r
++\r
++test_begin_subtest "Message with header of exactly 200 bytes"\r
++add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \\r
++            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++            '[body]="200-byte header"'\r
++output=$(notmuch reply  --reply-to=sender id:${gen_msg_id})\r
++test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces\r
++In-Reply-To: <${gen_msg_id}>\r
++References: <${gen_msg_id}>\r
++\r
++On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> 200-byte header"\r
++test_done\r
+-- \r
+1.7.2.3\r
+\r