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 DE1D642117B for ; Mon, 19 Aug 2013 08:13:55 -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 sz2hheGvB6gv for ; Mon, 19 Aug 2013 08:13:51 -0700 (PDT) Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 23B9D42117A for ; Mon, 19 Aug 2013 08:13:51 -0700 (PDT) Received: by mail-bk0-f47.google.com with SMTP id mx12so1485608bkb.34 for ; Mon, 19 Aug 2013 08:13:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=yrsQtXqOZACEU6y81YdPlIth9aGeBZEnFt0RAVm+Ga8=; b=UFb/1lLrLTS6Z5D2X8hS0YiVjsz9dm0QN0DG9yQ1E7Jit08uHK2kdQADdGHGWqFMfD a//dyty2kOieeK9UKIV6af3h+H6cN5DUb6k1xujZdQJGJt3f5tP3/xI9gC8l5B0PCein zDvhyNhGazvTp3s3PChURP/xXe7vxg05IF1Ue7dL6+p0VPt+GJot7iBLpC+UPD5vwB4z qH/hN1iG5M/cpSPkr7p3xIpnqbExxQeK0cKglDgZKguUtGl6B00uL9zYx1uwvlwYjSeN mhgQs4KWr22OZdLQU+5fDDvuovGGCZZCGzTZS2/OsrVrrbahRlERs8VjWAD0MrJcT9Vp tung== X-Gm-Message-State: ALoCoQnRar1UMdRPISAay3ZX5WlU8m04KM2VqmX4dUuadF0XoMYX8RuRdkZIbd25RjSDtnGXszG4 X-Received: by 10.205.9.198 with SMTP id ox6mr8533818bkb.19.1376925229688; Mon, 19 Aug 2013 08:13:49 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id m6sm1924145bki.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 08:13:48 -0700 (PDT) From: Jani Nikula To: Tomi Ollila , Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH v2] test: Canonicalize RFC 2047 encoding and charset In-Reply-To: References: <1376923203-14406-1-git-send-email-amdragon@mit.edu> User-Agent: Notmuch/0.16+10~g791e68f (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Mon, 19 Aug 2013 18:13:50 +0300 Message-ID: <871u5pbtn5.fsf@nikula.org> 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 15:13:56 -0000 On Mon, 19 Aug 2013, Tomi Ollila wrote: > 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. And the relevant test passes with this version too. Jani.