From e10139bf418eb0068683f03c55f4d86bcbbe7cc5 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Mon, 19 Aug 2013 09:52:06 +2000 Subject: [PATCH] [PATCH] test: Canonicalize RFC 2047 encoding and charset --- 0b/82475975cc7df6da41cbd14d185d23d1f9b1e7 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 0b/82475975cc7df6da41cbd14d185d23d1f9b1e7 diff --git a/0b/82475975cc7df6da41cbd14d185d23d1f9b1e7 b/0b/82475975cc7df6da41cbd14d185d23d1f9b1e7 new file mode 100644 index 000000000..9c44be3d1 --- /dev/null +++ b/0b/82475975cc7df6da41cbd14d185d23d1f9b1e7 @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 92B87429E59 + for ; Sun, 18 Aug 2013 06:52:25 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0edm33RPyHoY for ; + Sun, 18 Aug 2013 06:52:17 -0700 (PDT) +Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu + [18.9.25.15]) + by olra.theworths.org (Postfix) with ESMTP id 2667B431FDB + for ; Sun, 18 Aug 2013 06:52:17 -0700 (PDT) +X-AuditID: 1209190f-b7fa58e000000953-52-5210d1906fc0 +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP + id C6.0B.02387.091D0125; Sun, 18 Aug 2013 09:52:16 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r7IDqESM015731; + Sun, 18 Aug 2013 09:52:14 -0400 +Received: from drake.dyndns.org + (static-burl-mse-71-161-109-98.ngn.east.myfairpoint.net + [71.161.109.98]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7IDqA6O023275 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sun, 18 Aug 2013 09:52:13 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1VB3Or-0001az-36; Sun, 18 Aug 2013 09:52:09 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] test: Canonicalize RFC 2047 encoding and charset +Date: Sun, 18 Aug 2013 09:52:06 -0400 +Message-Id: <1376833926-6024-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsUixCmqrTvhokCQwfuzyhY3WrsZLZqmO1tc + vzmT2YHZ49b91+wez1bdYvbYcug9cwBzFJdNSmpOZllqkb5dAlfGod9CBT85KzYs/sHcwLiQ + o4uRk0NCwETi1JofbBC2mMSFe+uBbC4OIYF9jBKHb8xihnA2MkrsePoBKnOPSeLajt+sIC1C + AnMZJVoO5ILYbAIaEtv2L2cEsUUEpCV23p0NVsMs4CVx5f45ZhBbWMBR4sHh02DrWARUJVp7 + tzGB2LwC9hI35lxihThDUaL72QS2CYy8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuma6OVm + luilppRuYgSHiiT/DsZvB5UOMQpwMCrx8Ea85g8SYk0sK67MPcQoycGkJMrbe1YgSIgvKT+l + MiOxOCO+qDQntfgQowQHs5II7865QDnelMTKqtSifJiUNAeLkjjvs6dnA4UE0hNLUrNTUwtS + i2CyMhwcShK86ReAGgWLUtNTK9Iyc0oQ0kwcnCDDeYCGbzsHMry4IDG3ODMdIn+KUVFKnHcJ + SLMASCKjNA+uFxbLrxjFgV4R5r0E0s4DTANw3a+ABjMBDZ50hhdkcEkiQkqqgdHk/K4Q9Zao + upvcb1wfL7rIv1fwsNlsW7UDN20mPzouvVnW2ekd18wVi8573/x5TsXG5ZWtl9yDXOU5Fb/U + L+VUHCm9c+T8h/nx3ZVFEjPWqnm1y2nfaLmi6HdqyYR5/W8X3FSwkSpmdRE3mvlvqk3omztf + PofW+5SbVtQEM556X9Q9vzjB4JQSS3FGoqEWc1FxIgDc4u+9wAIAAA== +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 18 Aug 2013 13:52:26 -0000 + +RFC 2047 states that the encoding and charset in an encoded word are +case-insensitive, so force them to lower case in the reply test. This +fixes an issue caused by GMime versions (somewhere between 2.6.10 and +2.6.16), which changed the capitalization of the encoding. +--- + test/reply | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/test/reply b/test/reply +index d4389cf..a078927 100755 +--- a/test/reply ++++ b/test/reply +@@ -201,12 +201,14 @@ add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="Encoding"' + +-output=$(notmuch reply id:${gen_msg_id}) +-# Note that GMime changes from Q- to B-encoding ++# GMime happens to change from Q- to B-encoding. We canonicalize the ++# case of the encoding and charset because different versions of GMime ++# capitalize the encoding differently. ++output=$(notmuch reply id:${gen_msg_id} | sed 's/=?[^?]*?[bB]?/\L&/g') + test_expect_equal "$output" "\ + From: Notmuch Test Suite + Subject: Re: =?iso-8859-1?b?4N/n?= +-To: =?UTF-8?b?4piD?= ++To: =?utf-8?b?4piD?= + In-Reply-To: <${gen_msg_id}> + References: <${gen_msg_id}> + +-- +1.7.10.4 + -- 2.26.2