[PATCH v3 1/3] reply: Test replying to messages with RFC 2047-encoded headers
authorAustin Clements <amdragon@MIT.EDU>
Fri, 16 Aug 2013 15:35:41 +0000 (11:35 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:20 +0000 (09:56 -0800)
b4/b70cc80144e8131a67428439f927fa7363b8b1 [new file with mode: 0644]

diff --git a/b4/b70cc80144e8131a67428439f927fa7363b8b1 b/b4/b70cc80144e8131a67428439f927fa7363b8b1
new file mode 100644 (file)
index 0000000..16399a8
--- /dev/null
@@ -0,0 +1,150 @@
+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 118BC429E40\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Aug 2013 08:35:55 -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 qOo-yhVBEfRa for <notmuch@notmuchmail.org>;\r
+       Fri, 16 Aug 2013 08:35:49 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
+       [18.7.68.35])\r
+       by olra.theworths.org (Postfix) with ESMTP id 65156429E2F\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Aug 2013 08:35:49 -0700 (PDT)\r
+X-AuditID: 12074423-b7f168e00000095a-44-520e46d45499\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 4F.C2.02394.4D64E025; Fri, 16 Aug 2013 11:35:48 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r7GFZkJF022495; \r
+       Fri, 16 Aug 2013 11:35:46 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (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 r7GFZiEs020143\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 16 Aug 2013 11:35:45 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VAM40-0002vY-75; Fri, 16 Aug 2013 11:35:44 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject:\r
+ [PATCH v3 1/3] reply: Test replying to messages with RFC 2047-encoded headers\r
+Date: Fri, 16 Aug 2013 11:35:41 -0400\r
+Message-Id: <1376667343-10863-2-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1376667343-10863-1-git-send-email-amdragon@mit.edu>\r
+References: <1376667343-10863-1-git-send-email-amdragon@mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IRYrdT0b3ixhdkcO65ucWefV4W12/OZLZ4\r
+       s3IeqwOzx93TXB6Hvy5k8Xi26hZzAHMUl01Kak5mWWqRvl0CV0Z/1zPGgs2CFZ+39rA3ML7l\r
+       6WLk5JAQMJHo3HyQDcIWk7hwbz2QzcUhJLCPUeLSruksEM5GRokZ965BOXeYJDpuNrBDOHOB\r
+       yhY/ZAbpZxPQkNi2fzkjiC0iIC2x8+5sVhCbWSBeou3FdnYQW1igTqLr7BqwGhYBVYmFU3eB\r
+       7eYVcJC4cvktC8QdihLdzyaAxTkFHCU+938CiwsB1eyYtxSqXlDi5MwnQHEOoPnqEuvnCUGs\r
+       kpdo3jqbeQKj0CwkVbMQqmYhqVrAyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI10wvN7NELzWl\r
+       dBMjONBdlHcw/jmodIhRgINRiYeXYSJvkBBrYllxZe4hRkkOJiVR3nmOfEFCfEn5KZUZicUZ\r
+       8UWlOanFhxglOJiVRHi3GgDleFMSK6tSi/JhUtIcLErivM+eng0UEkhPLEnNTk0tSC2Cycpw\r
+       cChJ8C50BWoULEpNT61Iy8wpQUgzcXCCDOcBGr4HpIa3uCAxtzgzHSJ/ilFRSpzXGSQhAJLI\r
+       KM2D64UloleM4kCvCPOeAqniASYxuO5XQIOZgAZPOsMLMrgkESEl1cBYduhuQGvHlqXLzSbP\r
+       ervWbjnHMdGm86F+36od5ebW3ZzapP9pwoMJkWqy61sXsJa9Wfjh62mpt+eUFR6o/Pc8GfWi\r
+       1EpOQXOa9Y9JpQIaCWrBIqamzOtqnr21chNe8FNpd7K76x820Z3+rEvkDG+e/alUce1ocuVb\r
+       BnfVudNW3bw3/9iM4P9HlFiKMxINtZiLihMBR3KB8R8DAAA=\r
+Cc: tomi.ollila@iki.fi\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, 16 Aug 2013 15:35:55 -0000\r
+\r
+---\r
+ test/reply |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+ 1 file changed, 56 insertions(+)\r
+\r
+diff --git a/test/reply b/test/reply\r
+index ee5d361..c877ffe 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
\r
++test_begin_subtest "Reply with RFC 2047-encoded headers"\r
++add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \\r
++          '[from]="=?utf-8?q?=e2=98=83?= <snowman@example.com>"' \\r
++          '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
++          '[body]="Encoding"'\r
++\r
++output=$(notmuch reply id:${gen_msg_id})\r
++test_expect_equal "$output" "\\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Re: àßç\r
++To: ☃ <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, ☃ <snowman@example.com> wrote:\r
++> Encoding"\r
++\r
++test_begin_subtest "Reply with RFC 2047-encoded headers (JSON)"\r
++output=$(notmuch reply --format=json 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
++        "Subject": "Re: \u00e0\u00df\u00e7",\r
++        "To": "\u2603 <snowman@example.com>"\r
++    }\r
++}'\r
++\r
++\r
+ test_done\r
+-- \r
+1.7.10.4\r
+\r