Re: [PATCH v3 4/4] test: add tests for "notmuch reply" --reply-to=sender
authorAustin Clements <amdragon@MIT.EDU>
Thu, 12 Jan 2012 03:50:32 +0000 (22:50 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:56 +0000 (09:41 -0800)
90/0df59c154a2d873217eb88d34ddeea91bfce93 [new file with mode: 0644]

diff --git a/90/0df59c154a2d873217eb88d34ddeea91bfce93 b/90/0df59c154a2d873217eb88d34ddeea91bfce93
new file mode 100644 (file)
index 0000000..25a4401
--- /dev/null
@@ -0,0 +1,319 @@
+Return-Path: <amdragon@mit.edu>\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 52A3C429E26\r
+       for <notmuch@notmuchmail.org>; Wed, 11 Jan 2012 19:50:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 dR35gCr68APF for <notmuch@notmuchmail.org>;\r
+       Wed, 11 Jan 2012 19:50:29 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 51FC5429E25\r
+       for <notmuch@notmuchmail.org>; Wed, 11 Jan 2012 19:50:29 -0800 (PST)\r
+X-AuditID: 1209190e-b7f7c6d0000008c3-a4-4f0e58849f90\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id CB.36.02243.4885E0F4; Wed, 11 Jan 2012 22:50:28 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q0C3oSVl032256; \r
+       Wed, 11 Jan 2012 22:50:28 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0C3oRmL014719\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Wed, 11 Jan 2012 22:50:27 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RlBgO-0004j5-4O; Wed, 11 Jan 2012 22:50:32 -0500\r
+Date: Wed, 11 Jan 2012 22:50:32 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH v3 4/4] test: add tests for "notmuch reply"\r
+       --reply-to=sender\r
+Message-ID: <20120112035032.GV20796@mit.edu>\r
+References: <cover.1325794371.git.jani@nikula.org>\r
+       <cover.1326224339.git.jani@nikula.org>\r
+       <33b8a00a073d39baeecc86b8b8f97683d2cec3c0.1326224339.git.jani@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To:\r
+ <33b8a00a073d39baeecc86b8b8f97683d2cec3c0.1326224339.git.jani@nikula.org>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0W2J4PM3mLPQwKJpurPF9ZszmR2Y\r
+       PG7df83u8WzVLeYApigum5TUnMyy1CJ9uwSujOObzrAXnA2uOPf6JWsDY7dzFyMnh4SAicSG\r
+       m3dYIWwxiQv31rN1MXJxCAnsY5S4ufsNWEJIYAOjxNnrYRCJk0wSl2/+ZoRwljBKzD10hwmk\r
+       ikVAVaJ74RNGEJtNQENi2/7lYLaIgKLE5pP7wWxmAWmJb7+bweqFBYIlzr26xwZi8wroSExu\r
+       uM8CMXQ5o8T7o/8ZIRKCEidnPmGBaNaSuPHvJVAzB9ig5f84QMKcAmESS/Z+A5spKqAiMeXk\r
+       NrYJjEKzkHTPQtI9C6F7ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1jvdzMEr3UlNJNjKCw\r
+       5pTk28H49aDSIUYBDkYlHt6de3n9hVgTy4orcw8xSnIwKYny3gjn8xfiS8pPqcxILM6ILyrN\r
+       SS0+xCjBwawkwutUA1TOm5JYWZValA+TkuZgURLnVdN65yckkJ5YkpqdmlqQWgSTleHgUJLg\r
+       vQgyVLAoNT21Ii0zpwQhzcTBCTKcB2j4CZAa3uKCxNzizHSI/ClGRSlx3i6QhABIIqM0D64X\r
+       lnZeMYoDvSLMewGkigeYsuC6XwENZgIavGUdD8jgkkSElFQDY9NBGbvqDzPXqzOXcnn4C//k\r
+       8HuVpWp41KR+u7tk+ZNdpV8/HPlorB969vwF+3mP1mRdfXFvVf0Dvf9z4475uLa/3PRhsojK\r
+       mW+b6nZZ7J46T8KJVeV6yW/GVRU9jzNWsijzO54re2BbfWTHgzCbpHkbkl0Kg1KMin5qCncd\r
+       8Wl6ufzv2nl53UosxRmJhlrMRcWJAKjRFvIWAwAA\r
+Cc: notmuch@notmuchmail.org\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: Thu, 12 Jan 2012 03:50:31 -0000\r
+\r
+I'm not sure what the point of the last test is, but this patch\r
+covered everything I could think of, so LGTM.\r
+\r
+Quoth Jani Nikula on Jan 10 at  9:54 pm:\r
+> From: Mark Walters <markwalters1009@gmail.com>\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