unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH 4/6] reply: Test replying to messages with RFC 2047-encoded headers
Date: Tue, 13 Aug 2013 12:13:57 -0400	[thread overview]
Message-ID: <87ioz9wou2.fsf@awakening.csail.mit.edu> (raw)
In-Reply-To: <1376332839-22825-5-git-send-email-amdragon@mit.edu>

On Mon, 12 Aug 2013, Austin Clements <amdragon@MIT.EDU> wrote:
> ---
>  test/reply |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
>
> diff --git a/test/reply b/test/reply
> index ee5d361..a85ebe5 100755
> --- a/test/reply
> +++ b/test/reply
> @@ -193,4 +193,60 @@ References: <${gen_msg_id}>
>  On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
>  > From guessing"
>  
> +test_begin_subtest "Reply with RFC 2047-encoded headers"
> +add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \
> +	    '[from]="=?utf-8?q?=e2=98=83?= <snowman@example.com>"' \
> +	    '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
> +	    '[body]="Encoding"'
> +
> +output=$(notmuch reply id:${gen_msg_id})
> +test_expect_equal "$output" "\
> +From: Notmuch Test Suite <test_suite@notmuchmail.org>
> +Subject: Re: àßç
> +To: ☃ <snowman@example.com>
> +In-Reply-To: <${gen_msg_id}>
> +References: <${gen_msg_id}>
> +
> +On Tue, 05 Jan 2010 15:43:56 -0000, ☃ <snowman@example.com> wrote:
> +> Encoding"
> +
> +test_begin_subtest "Reply with RFC 2047-encoded headers (JSON)"
> +output=$(notmuch reply --format=json id:${gen_msg_id})
> +test_expect_equal_json "$output" '
> +{
> +    "original": {
> +        "body": [
> +            {
> +                "content": "Encoding\n",
> +                "content-type": "text/plain",
> +                "id": 1
> +            }
> +        ],
> +        "date_relative": "2010-01-05",
> +        "excluded": false,
> +        "filename": "'${MAIL_DIR}'/msg-012",
> +        "headers": {
> +            "Date": "Tue, 05 Jan 2010 15:43:56 +0000",
> +            "From": "\u2603 <snowman@example.com>",
> +            "Subject": "\u00e0\u00df\u00e7",
> +            "To": "Notmuch Test Suite <test_suite@notmuchmail.org>"
> +        },
> +        "id": "'${gen_msg_id}'",
> +        "match": false,
> +        "tags": [
> +            "inbox",
> +            "unread"
> +        ],
> +        "timestamp": 1262706236
> +    },
> +    "reply-headers": {
> +        "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
> +        "In-reply-to": "<'${gen_msg_id}'>",
> +        "References": "<'${gen_msg_id}'>",

I screwed up when I was rebasing patches in this series.  There's
supposed to be a space before the < above, which should then be removed
in patch 5.  If people take a look over this series, I'll fix this along
with the commit message typo in v2.

> +        "Subject": "Re: \u00e0\u00df\u00e7",
> +        "To": "\u2603 <snowman@example.com>"
> +    }
> +}'
> +
> +
>  test_done
> -- 
> 1.7.10.4

  reply	other threads:[~2013-08-13 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 18:40 [PATCH 0/6] Clean up reply's encoding story Austin Clements
2013-08-12 18:40 ` [PATCH 1/6] lib: Correct out-of-date doc comment Austin Clements
2013-08-12 18:40 ` [PATCH 2/6] lib: Document which strings are returned in UTF-8 Austin Clements
2013-08-12 18:40 ` [PATCH 3/6] reply: Document the reason for g_mime_filter_headers Austin Clements
2013-08-15  8:40   ` David Bremner
2013-08-12 18:40 ` [PATCH 4/6] reply: Test replying to messages with RFC 2047-encoded headers Austin Clements
2013-08-13 16:13   ` Austin Clements [this message]
2013-08-12 18:40 ` [PATCH 5/6] reply: Remove extraneous space from generated References Austin Clements
2013-08-12 18:40 ` [PATCH 6/6] reply: Use RFC 2822/MIME wholly for text format template Austin Clements
2013-08-12 20:01   ` Austin Clements
2013-08-14 17:04 ` [PATCH 0/6] Clean up reply's encoding story Tomi Ollila
2013-08-14 17:20   ` Austin Clements

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=87ioz9wou2.fsf@awakening.csail.mit.edu \
    --to=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).