From: Austin Clements Date: Thu, 12 Jan 2012 03:50:32 +0000 (+1900) Subject: Re: [PATCH v3 4/4] test: add tests for "notmuch reply" --reply-to=sender X-Git-Url: http://git.tremily.us/?p=notmuch-archives.git;a=commitdiff_plain;h=24848135e2541a39176ca23eb57d191f4ee21c95 Re: [PATCH v3 4/4] test: add tests for "notmuch reply" --reply-to=sender --- diff --git a/90/0df59c154a2d873217eb88d34ddeea91bfce93 b/90/0df59c154a2d873217eb88d34ddeea91bfce93 new file mode 100644 index 000000000..25a440105 --- /dev/null +++ b/90/0df59c154a2d873217eb88d34ddeea91bfce93 @@ -0,0 +1,319 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 52A3C429E26 + for ; Wed, 11 Jan 2012 19:50:31 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id dR35gCr68APF for ; + Wed, 11 Jan 2012 19:50:29 -0800 (PST) +Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU + [18.9.25.14]) + by olra.theworths.org (Postfix) with ESMTP id 51FC5429E25 + for ; Wed, 11 Jan 2012 19:50:29 -0800 (PST) +X-AuditID: 1209190e-b7f7c6d0000008c3-a4-4f0e58849f90 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id CB.36.02243.4885E0F4; Wed, 11 Jan 2012 22:50:28 -0500 (EST) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q0C3oSVl032256; + Wed, 11 Jan 2012 22:50:28 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0C3oRmL014719 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Wed, 11 Jan 2012 22:50:27 -0500 (EST) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1RlBgO-0004j5-4O; Wed, 11 Jan 2012 22:50:32 -0500 +Date: Wed, 11 Jan 2012 22:50:32 -0500 +From: Austin Clements +To: Jani Nikula +Subject: Re: [PATCH v3 4/4] test: add tests for "notmuch reply" + --reply-to=sender +Message-ID: <20120112035032.GV20796@mit.edu> +References: + + <33b8a00a073d39baeecc86b8b8f97683d2cec3c0.1326224339.git.jani@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: + <33b8a00a073d39baeecc86b8b8f97683d2cec3c0.1326224339.git.jani@nikula.org> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0W2J4PM3mLPQwKJpurPF9ZszmR2Y + PG7df83u8WzVLeYApigum5TUnMyy1CJ9uwSujOObzrAXnA2uOPf6JWsDY7dzFyMnh4SAicSG + m3dYIWwxiQv31rN1MXJxCAnsY5S4ufsNWEJIYAOjxNnrYRCJk0wSl2/+ZoRwljBKzD10hwmk + ikVAVaJ74RNGEJtNQENi2/7lYLaIgKLE5pP7wWxmAWmJb7+bweqFBYIlzr26xwZi8wroSExu + uM8CMXQ5o8T7o/8ZIRKCEidnPmGBaNaSuPHvJVAzB9ig5f84QMKcAmESS/Z+A5spKqAiMeXk + NrYJjEKzkHTPQtI9C6F7ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1jvdzMEr3UlNJNjKCw + 5pTk28H49aDSIUYBDkYlHt6de3n9hVgTy4orcw8xSnIwKYny3gjn8xfiS8pPqcxILM6ILyrN + SS0+xCjBwawkwutUA1TOm5JYWZValA+TkuZgURLnVdN65yckkJ5YkpqdmlqQWgSTleHgUJLg + vQgyVLAoNT21Ii0zpwQhzcTBCTKcB2j4CZAa3uKCxNzizHSI/ClGRSlx3i6QhABIIqM0D64X + lnZeMYoDvSLMewGkigeYsuC6XwENZgIavGUdD8jgkkSElFQDY9NBGbvqDzPXqzOXcnn4C//k + 8HuVpWp41KR+u7tk+ZNdpV8/HPlorB969vwF+3mP1mRdfXFvVf0Dvf9z4475uLa/3PRhsojK + mW+b6nZZ7J46T8KJVeV6yW/GVRU9jzNWsijzO54re2BbfWTHgzCbpHkbkl0Kg1KMin5qCncd + 8Wl6ufzv2nl53UosxRmJhlrMRcWJAKjRFvIWAwAA +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 12 Jan 2012 03:50:31 -0000 + +I'm not sure what the point of the last test is, but this patch +covered everything I could think of, so LGTM. + +Quoth Jani Nikula on Jan 10 at 9:54 pm: +> From: Mark Walters +> +> --- +> test/notmuch-test | 1 + +> test/reply-to-sender | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++ +> 2 files changed, 210 insertions(+), 0 deletions(-) +> create mode 100755 test/reply-to-sender +> +> diff --git a/test/notmuch-test b/test/notmuch-test +> index e40ef86..6a99ae3 100755 +> --- a/test/notmuch-test +> +++ b/test/notmuch-test +> @@ -33,6 +33,7 @@ TESTS=" +> thread-naming +> raw +> reply +> + reply-to-sender +> dump-restore +> uuencode +> thread-order +> diff --git a/test/reply-to-sender b/test/reply-to-sender +> new file mode 100755 +> index 0000000..c7d15bb +> --- /dev/null +> +++ b/test/reply-to-sender +> @@ -0,0 +1,209 @@ +> +#!/usr/bin/env bash +> +test_description="\"notmuch reply --reply-to=sender\" in several variations" +> +. ./test-lib.sh +> + +> +test_begin_subtest "Basic reply-to-sender" +> +add_message '[from]="Sender "' \ +> + [to]=test_suite@notmuchmail.org \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="basic reply-to-sender test"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> basic reply-to-sender test" +> + +> +test_begin_subtest "From Us, Basic reply to message" +> +add_message '[from]="Notmuch Test Suite "' \ +> + '[to]="Recipient "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="basic reply-to-from-us test"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Recipient +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: +> +> basic reply-to-from-us test" +> + +> +test_begin_subtest "Multiple recipients" +> +add_message '[from]="Sender "' \ +> + '[to]="test_suite@notmuchmail.org, Someone Else "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="Multiple recipients"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> Multiple recipients" +> + +> +test_begin_subtest "From Us, Multiple TO recipients" +> +add_message '[from]="Notmuch Test Suite "' \ +> + '[to]="Recipient , Someone Else "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="From Us, Multiple TO recipients"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Recipient , Someone Else +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: +> +> From Us, Multiple TO recipients" +> + +> +test_begin_subtest "Reply with CC" +> +add_message '[from]="Sender "' \ +> + [to]=test_suite@notmuchmail.org \ +> + '[cc]="Other Parties "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="reply with CC"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> reply with CC" +> + +> +test_begin_subtest "From Us, Reply with CC" +> +add_message '[from]="Notmuch Test Suite "' \ +> + '[to]="Recipient "' \ +> + '[cc]="Other Parties "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="reply with CC"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Recipient +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: +> +> reply with CC" +> + +> +test_begin_subtest "From Us, Reply no TO but with CC" +> +add_message '[from]="Notmuch Test Suite "' \ +> + '[cc]="Other Parties "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="reply with CC"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +Cc: Other Parties +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: +> +> reply with CC" +> + +> +test_begin_subtest "Reply from alternate address" +> +add_message '[from]="Sender "' \ +> + [to]=test_suite_other@notmuchmail.org \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="reply from alternate address"' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> reply from alternate address" +> + +> +test_begin_subtest "Support for Reply-To" +> +add_message '[from]="Sender "' \ +> + [to]=test_suite@notmuchmail.org \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="support for reply-to"' \ +> + '[reply-to]="Sender "' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> support for reply-to" +> + +> +test_begin_subtest "Support for Reply-To with multiple recipients" +> +add_message '[from]="Sender "' \ +> + '[to]="test_suite@notmuchmail.org, Someone Else "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="support for reply-to with multiple recipients"' \ +> + '[reply-to]="Sender "' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> support for reply-to with multiple recipients" +> + +> +test_begin_subtest "Un-munging Reply-To" +> +add_message '[from]="Sender "' \ +> + '[to]="Some List "' \ +> + [subject]=notmuch-reply-test \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="Un-munging Reply-To"' \ +> + '[reply-to]="Evil Munging List "' +> + +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +Subject: Re: notmuch-reply-test +> +To: Sender +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> +> Un-munging Reply-To" +> + +> +test_begin_subtest "Message with header of exactly 200 bytes" +> +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"' \ +> + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> + '[body]="200-byte header"' +> +output=$(notmuch reply --reply-to=sender id:${gen_msg_id}) +> +test_expect_equal "$output" "From: Notmuch Test Suite +> +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 +> +In-Reply-To: <${gen_msg_id}> +> +References: <${gen_msg_id}> +> + +> +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite wrote: +> +> 200-byte header" +> +test_done