From: Jani Nikula <jani@nikula.org>
To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test: Canonicalize RFC 2047 encoding and charset
Date: Sun, 18 Aug 2013 18:10:56 +0300 [thread overview]
Message-ID: <8738q7f30f.fsf@nikula.org> (raw)
In-Reply-To: <1376833926-6024-1-git-send-email-amdragon@mit.edu>
On Sun, 18 Aug 2013, Austin Clements <amdragon@MIT.EDU> 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.
LGTM, and this fixes id:8738q8jzh3.fsf@nikula.org with GMime 2.6.16.
BR,
Jani.
> ---
> 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 <test_suite@notmuchmail.org>
> Subject: Re: =?iso-8859-1?b?4N/n?=
> -To: =?UTF-8?b?4piD?= <snowman@example.com>
> +To: =?utf-8?b?4piD?= <snowman@example.com>
> In-Reply-To: <${gen_msg_id}>
> References: <${gen_msg_id}>
>
> --
> 1.7.10.4
next prev parent reply other threads:[~2013-08-18 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 13:52 [PATCH] test: Canonicalize RFC 2047 encoding and charset Austin Clements
2013-08-18 15:10 ` Jani Nikula [this message]
2013-08-18 18:05 ` Tomi Ollila
2013-08-19 14:40 ` [PATCH v2] " Austin Clements
2013-08-19 14:43 ` Tomi Ollila
2013-08-19 15:13 ` Jani Nikula
2013-08-20 7:16 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738q7f30f.fsf@nikula.org \
--to=jani@nikula.org \
--cc=amdragon@MIT.EDU \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).