[PATCH v4 5/5] test: add tests for "notmuch reply" --reply-to=sender
authorJani Nikula <jani@nikula.org>
Thu, 12 Jan 2012 21:40:19 +0000 (23:40 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:01 +0000 (09:42 -0800)
1c/d89626392cf80fdd6bb90b2294043552748c52 [new file with mode: 0644]

diff --git a/1c/d89626392cf80fdd6bb90b2294043552748c52 b/1c/d89626392cf80fdd6bb90b2294043552748c52
new file mode 100644 (file)
index 0000000..7825da6
--- /dev/null
@@ -0,0 +1,294 @@
+Return-Path: <jani@nikula.org>\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 25C52429E42\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 13:40:56 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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 NoITed5ypHpC for <notmuch@notmuchmail.org>;\r
+       Thu, 12 Jan 2012 13:40:54 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 688D7429E40\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 13:40:43 -0800 (PST)\r
+Received: by mail-wi0-f181.google.com with SMTP id hr12so1742120wib.26\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 13:40:43 -0800 (PST)\r
+Received: by 10.180.83.69 with SMTP id o5mr9730963wiy.1.1326404443108;\r
+       Thu, 12 Jan 2012 13:40:43 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
+       [80.220.92.23])\r
+       by mx.google.com with ESMTPS id ee6sm11572419wib.4.2012.01.12.13.40.40\r
+       (version=SSLv3 cipher=OTHER); Thu, 12 Jan 2012 13:40:42 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 5/5] test: add tests for "notmuch reply" --reply-to=sender\r
+Date: Thu, 12 Jan 2012 23:40:19 +0200\r
+Message-Id:\r
+ <99ec753bf8f9b1e0d9c09b34b9a6d3a9e80875f5.1326403905.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <cover.1326403905.git.jani@nikula.org>\r
+References: <cover.1326403905.git.jani@nikula.org>\r
+In-Reply-To: <cover.1326403905.git.jani@nikula.org>\r
+References: <cover.1325794371.git.jani@nikula.org>\r
+       <cover.1326403905.git.jani@nikula.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 21:40:56 -0000\r
+\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
+-- \r
+1.7.5.4\r
+\r