--- /dev/null
+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 32D41429E59\r
+ for <notmuch@notmuchmail.org>; Mon, 19 Aug 2013 07:40:21 -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 TPdaOAtA-UJn for <notmuch@notmuchmail.org>;\r
+ Mon, 19 Aug 2013 07:40:15 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu\r
+ [18.7.68.37])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0468B431E62\r
+ for <notmuch@notmuchmail.org>; Mon, 19 Aug 2013 07:40:14 -0700 (PDT)\r
+X-AuditID: 12074425-b7f0c8e000000953-5e-52122e4ec1fc\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 8F.C8.02387.E4E22125; Mon, 19 Aug 2013 10:40:14 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r7JEeBY7003586; \r
+ Mon, 19 Aug 2013 10:40:12 -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 r7JEe81T028340\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Mon, 19 Aug 2013 10:40:10 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1VBQcq-0003lQ-1g; Mon, 19 Aug 2013 10:40:08 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2] test: Canonicalize RFC 2047 encoding and charset\r
+Date: Mon, 19 Aug 2013 10:40:03 -0400\r
+Message-Id: <1376923203-14406-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <m238q698na.fsf@guru.guru-group.fi>\r
+References: <m238q698na.fsf@guru.guru-group.fi>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsUixG6nruunJxRk0HFX1uJGazejRdN0Z4vr\r
+ N2cyW7xZOY/VgcXj8NeFLB637r9m93i26hazx5ZD75kDWKK4bFJSczLLUov07RK4MpbMe8NS\r
+ 0MpV8eriYdYGxjUcXYycHBICJhLrD/5khbDFJC7cW8/WxcjFISSwj1Fi589lLBDORkaJg6ve\r
+ sEM4d5gkFqz+zArhzGWUOHqonQ2kn01AQ2Lb/uWMILaIgLTEzruzweYyC6RLdG77zQxiCwu4\r
+ SMy5844JxGYRUJU4++gTWC+vgINE97mpUHcoSnQ/mwAW5xQwkGg4sIEFxBYS0JdY8/8Q4wRG\r
+ /gWMDKsYZVNyq3RzEzNzilOTdYuTE/PyUot0LfRyM0v0UlNKNzGCQ85FdQfjhENKhxgFOBiV\r
+ eHg7lISChFgTy4orcw8xSnIwKYnyvtYCCvEl5adUZiQWZ8QXleakFh9ilOBgVhLh/coOlONN\r
+ SaysSi3Kh0lJc7AoifM+f3o2UEggPbEkNTs1tSC1CCYrw8GhJME7UReoUbAoNT21Ii0zpwQh\r
+ zcTBCTKcB2i4P0gNb3FBYm5xZjpE/hSjopQ471SQhABIIqM0D64XlhJeMYoDvSLMWwhSxQNM\r
+ J3Ddr4AGMwENnq0BNrgkESEl1cCo6SV5WGh2wHI9tdor5c5JL39y9RnOr8zb/yH02/ZVvrxq\r
+ H1frJrYrnAz8KfF7ZeEu8Ujrp4o21RteuR25yPi/n8NHVnSaUbEZA5dvcXifpkNoofHLrfkR\r
+ Eznnq+V6ndBzTzfS7TePWTZj9/y3ZfnmAm57lyiuzmfQ2JJydeKl6olMDFX/zZVYijMSDbWY\r
+ i4oTAbf+MdTkAgAA\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: Mon, 19 Aug 2013 14:40:21 -0000\r
+\r
+RFC 2047 states that the encoding and charset in an encoded word are\r
+case-insensitive, so force them to lower case in the reply test. This\r
+fixes an issue caused by GMime versions (somewhere between 2.6.10 and\r
+2.6.16), which changed the capitalization of the encoding.\r
+---\r
+ test/reply | 8 +++++---\r
+ 1 file changed, 5 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/reply b/test/reply\r
+index d4389cf..b0d854a 100755\r
+--- a/test/reply\r
++++ b/test/reply\r
+@@ -201,12 +201,14 @@ add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \\r
+ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
+ '[body]="Encoding"'\r
+ \r
+-output=$(notmuch reply id:${gen_msg_id})\r
+-# Note that GMime changes from Q- to B-encoding\r
++# GMime happens to change from Q- to B-encoding. We canonicalize the\r
++# case of the encoding and charset because different versions of GMime\r
++# capitalize the encoding differently.\r
++output=$(notmuch reply id:${gen_msg_id} | perl -pe 's/=\?[^?]+\?[bB]\?/lc($&)/ge')\r
+ test_expect_equal "$output" "\\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ Subject: Re: =?iso-8859-1?b?4N/n?=\r
+-To: =?UTF-8?b?4piD?= <snowman@example.com>\r
++To: =?utf-8?b?4piD?= <snowman@example.com>\r
+ In-Reply-To: <${gen_msg_id}>\r
+ References: <${gen_msg_id}>\r
+ \r
+-- \r
+1.7.10.4\r
+\r