Re: [PATCH] test: Canonicalize RFC 2047 encoding and charset
authorJani Nikula <jani@nikula.org>
Sun, 18 Aug 2013 15:10:56 +0000 (18:10 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:26 +0000 (09:56 -0800)
55/47d7f00bb8c3b557566b0bdb664f865807efa8 [new file with mode: 0644]

diff --git a/55/47d7f00bb8c3b557566b0bdb664f865807efa8 b/55/47d7f00bb8c3b557566b0bdb664f865807efa8
new file mode 100644 (file)
index 0000000..a1a238f
--- /dev/null
@@ -0,0 +1,108 @@
+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 1E40E429E59\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 08:11:09 -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 tSZmEJRo4SJd for <notmuch@notmuchmail.org>;\r
+       Sun, 18 Aug 2013 08:10:59 -0700 (PDT)\r
+Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com\r
+       [209.85.214.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6FD21431FDB\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 08:10:59 -0700 (PDT)\r
+Received: by mail-bk0-f49.google.com with SMTP id r7so1107526bkg.8\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 08:10:58 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-gm-message-state:from:to:cc:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=u/GYWwLsHZuczNJWDEDBBFVnAbo4umqzMppbGJGLOq8=;\r
+       b=Z+nkxBTdf3EvcvOcouYFq1VVNnzBiuAI/ncDL/hVRBXFHwM+B+qAvNOaaYrNIvwuZA\r
+       ATrX3p27GxL2S0UqtaqzD4+JGj5DARb/+WemVRrDNjt97lkKbORTuVH6DfV6NFyeay7x\r
+       /hcVqYBJc0Kuh9fYPlkJD2codbY9tTzBVkX8WJlOTLzPkXWW6XaEpaI3XLtD2HP0pkkZ\r
+       vVLBaopjRm3n+e1Hpxt1DHHv0PcfP1R/IfTjgBrTvBcnnMXnbw2tZrnAoo9HMKsKy8re\r
+       qTVYA+/Bb0YS/mGuXvU+KGcnJTQY3FNwhCDgZMUoWV7nflACarvqqBWnW2uCXDH0vPI/\r
+       N9CQ==\r
+X-Gm-Message-State:\r
+ ALoCoQnyIKis6vrTLuP8QMWlgXvBNl3GrxPQH/s/SL26u5pv0a1uYA6f3q5G3F8TV+5kHp7pBGAx\r
+X-Received: by 10.204.62.132 with SMTP id x4mr4751621bkh.22.1376838656768;\r
+       Sun, 18 Aug 2013 08:10:56 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id w9sm945237bkn.12.1969.12.31.16.00.00\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 18 Aug 2013 08:10:55 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] test: Canonicalize RFC 2047 encoding and charset\r
+In-Reply-To: <1376833926-6024-1-git-send-email-amdragon@mit.edu>\r
+References: <1376833926-6024-1-git-send-email-amdragon@mit.edu>\r
+User-Agent: Notmuch/0.15.2+227~g40b2846 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sun, 18 Aug 2013 18:10:56 +0300\r
+Message-ID: <8738q7f30f.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Sun, 18 Aug 2013 15:11:09 -0000\r
+\r
+On Sun, 18 Aug 2013, Austin Clements <amdragon@MIT.EDU> wrote:\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
+LGTM, and this fixes id:8738q8jzh3.fsf@nikula.org with GMime 2.6.16.\r
+\r
+BR,\r
+Jani.\r
+\r
+\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..a078927 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} | sed 's/=?[^?]*?[bB]?/\L&/g')\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