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 CF59F429E59 for ; Mon, 19 Aug 2013 07:43:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 cP57kCn28OcF for ; Mon, 19 Aug 2013 07:43:20 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id DC8DD431E62 for ; Mon, 19 Aug 2013 07:43:19 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 37B3D100086; Mon, 19 Aug 2013 17:43:15 +0300 (EEST) From: Tomi Ollila To: Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH v2] test: Canonicalize RFC 2047 encoding and charset In-Reply-To: <1376923203-14406-1-git-send-email-amdragon@mit.edu> References: <1376923203-14406-1-git-send-email-amdragon@mit.edu> User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: Mon, 19 Aug 2013 14:43:59 -0000 On Mon, Aug 19 2013, Austin Clements wrote: > 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..b0d854a 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} | perl -pe 's/=\?[^?]+\?[bB]\?/lc($&)/ge') LGTM. Tomi > 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 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch