Re: [PATCH 4/6] reply: Test replying to messages with RFC 2047-encoded headers
authorAustin Clements <amdragon@MIT.EDU>
Tue, 13 Aug 2013 16:13:57 +0000 (12:13 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:17 +0000 (09:56 -0800)
9a/f3e3dba165c4f0fb13f4c1293ba99b671121f9 [new file with mode: 0644]

diff --git a/9a/f3e3dba165c4f0fb13f4c1293ba99b671121f9 b/9a/f3e3dba165c4f0fb13f4c1293ba99b671121f9
new file mode 100644 (file)
index 0000000..c9dff33
--- /dev/null
@@ -0,0 +1,158 @@
+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 05093431FBF\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Aug 2013 09:14:12 -0700 (PDT)\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 ojuQ2QBy2Hvb for <notmuch@notmuchmail.org>;\r
+       Tue, 13 Aug 2013 09:14:06 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 55760431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Aug 2013 09:14:06 -0700 (PDT)\r
+X-AuditID: 12074422-b7ef78e000000935-9a-520a5b4df2d1\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 15.E8.02357.D4B5A025; Tue, 13 Aug 2013 12:14:05 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r7DGE4Dt022990\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Aug 2013 12:14:05 -0400\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.8/8.12.4) with ESMTP id r7DGE1DW021275\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Aug 2013 12:14:04 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>) id 1V9HEN-0006Fr-FE\r
+       for notmuch@notmuchmail.org; Tue, 13 Aug 2013 12:13:59 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 4/6] reply: Test replying to messages with RFC\r
+       2047-encoded headers\r
+In-Reply-To: <1376332839-22825-5-git-send-email-amdragon@mit.edu>\r
+References: <1376332839-22825-1-git-send-email-amdragon@mit.edu>\r
+       <1376332839-22825-5-git-send-email-amdragon@mit.edu>\r
+User-Agent: Notmuch/0.15.2+182~gd0bd88f (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Tue, 13 Aug 2013 12:13:57 -0400\r
+Message-ID: <87ioz9wou2.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFvrAIsWRmVeSWpSXmKPExsUixCmqrOsbzRVksPS8kcX1mzOZHRg9nq26\r
+       xRzAGMVlk5Kak1mWWqRvl8CV0fnsCWPBIdGK20d3szYwfuHvYuTkkBAwkZhx9y0LhC0mceHe\r
+       erYuRi4OIYF9jBKNDy8xQzjnGSV2X30O5bxkkpjT8ZoVwjnEKNF35Q5YP5uAhsS2/csZQWwR\r
+       AWmJnXdns4LYwgLhEnOuNrOD2JwCjhJNB8+C2UICpRJtjw6D1YsKJEpMWtDJDGKzCKhKPJ++\r
+       E6yGF+i+df/XskHYghInZz4B28UsoC7xZ94lZghbW2LZwtfMExgFZyEpm4WkbBaSsgWMzKsY\r
+       ZVNyq3RzEzNzilOTdYuTE/PyUot0TfVyM0v0UlNKNzGCApbdRWkH48+DSocYBTgYlXh4H1hz\r
+       BQmxJpYVV+YeYpTkYFIS5b0SDhTiS8pPqcxILM6ILyrNSS0GhggHs5II71cboBxvSmJlVWpR\r
+       PkxKmoNFSZz32dOzgUIC6YklqdmpqQWpRTBZGQ4OJQne+iigRsGi1PTUirTMnBKENBMHJ8hw\r
+       HqDhrSA1vMUFibnFmekQ+VOMilLivIsigRICIImM0jy4XlhCecUoDvSKMK8CSDsPMBnBdb8C\r
+       GswENNiomQNkcEkiQkqqgZF157QH30/VnfXeqsH5RrDXoVfw4++Q4r8XVrVOP30useJQw1MJ\r
+       3vziJc/fF82rLD7jtT28JnCBz7HX2Y8WmKe+PCjpZtBc+3XBohkTdjc4aGu4rVLcaNm+RvR2\r
+       m9DxrFz7WdlqF9Z2tP+/XK1scbC3QXPVkTV7Dcps9gRUHX9stKDV9X7j20AlluKMREMt5qLi\r
+       RAAyCQbxAwMAAA==\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: Tue, 13 Aug 2013 16:14:12 -0000\r
+\r
+On Mon, 12 Aug 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> ---\r
+>  test/reply |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++=\r
+++\r
+>  1 file changed, 56 insertions(+)\r
+>\r
+> diff --git a/test/reply b/test/reply\r
+> index ee5d361..a85ebe5 100755\r
+> --- a/test/reply\r
+> +++ b/test/reply\r
+> @@ -193,4 +193,60 @@ References: <${gen_msg_id}>\r
+>  On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:\r
+>  > From guessing"\r
+>=20=20\r
+> +test_begin_subtest "Reply with RFC 2047-encoded headers"\r
+> +add_message '[subject]=3D"=3D?iso-8859-1?q?=3De0=3Ddf=3De7?=3D"' \\r
+> +        '[from]=3D"=3D?utf-8?q?=3De2=3D98=3D83?=3D <snowman@example.com>"' \\r
+> +        '[date]=3D"Tue, 05 Jan 2010 15:43:56 -0000"' \\r
+> +        '[body]=3D"Encoding"'\r
+> +\r
+> +output=3D$(notmuch reply id:${gen_msg_id})\r
+> +test_expect_equal "$output" "\\r
+> +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+> +Subject: Re: =C3=A0=C3=9F=C3=A7\r
+> +To: =E2=98=83 <snowman@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, =E2=98=83 <snowman@example.com> wrot=\r
+e:\r
+> +> Encoding"\r
+> +\r
+> +test_begin_subtest "Reply with RFC 2047-encoded headers (JSON)"\r
+> +output=3D$(notmuch reply --format=3Djson id:${gen_msg_id})\r
+> +test_expect_equal_json "$output" '\r
+> +{\r
+> +    "original": {\r
+> +        "body": [\r
+> +            {\r
+> +                "content": "Encoding\n",\r
+> +                "content-type": "text/plain",\r
+> +                "id": 1\r
+> +            }\r
+> +        ],\r
+> +        "date_relative": "2010-01-05",\r
+> +        "excluded": false,\r
+> +        "filename": "'${MAIL_DIR}'/msg-012",\r
+> +        "headers": {\r
+> +            "Date": "Tue, 05 Jan 2010 15:43:56 +0000",\r
+> +            "From": "\u2603 <snowman@example.com>",\r
+> +            "Subject": "\u00e0\u00df\u00e7",\r
+> +            "To": "Notmuch Test Suite <test_suite@notmuchmail.org>"\r
+> +        },\r
+> +        "id": "'${gen_msg_id}'",\r
+> +        "match": false,\r
+> +        "tags": [\r
+> +            "inbox",\r
+> +            "unread"\r
+> +        ],\r
+> +        "timestamp": 1262706236\r
+> +    },\r
+> +    "reply-headers": {\r
+> +        "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+> +        "In-reply-to": "<'${gen_msg_id}'>",\r
+> +        "References": "<'${gen_msg_id}'>",\r
+\r
+I screwed up when I was rebasing patches in this series.  There's\r
+supposed to be a space before the < above, which should then be removed\r
+in patch 5.  If people take a look over this series, I'll fix this along\r
+with the commit message typo in v2.\r
+\r
+> +        "Subject": "Re: \u00e0\u00df\u00e7",\r
+> +        "To": "\u2603 <snowman@example.com>"\r
+> +    }\r
+> +}'\r
+> +\r
+> +\r
+>  test_done\r
+> --=20\r
+> 1.7.10.4\r