From: Jonathan Tan <jonathantanmy@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, peff@peff.net
Subject: Re: [RFC/PATCH 2/3] mailinfo: correct malformed test example
Date: Fri, 16 Sep 2016 17:31:44 -0700 [thread overview]
Message-ID: <3a27685f-a53b-03a7-93d5-0492638faf51@google.com> (raw)
In-Reply-To: <xmqqbmznihe0.fsf@gitster.mtv.corp.google.com>
On 09/16/2016 03:55 PM, Junio C Hamano wrote:
> Hmph, these:
>
> t/t5100/info0008--no-inbody-headers | 5 +++++
> t/t5100/msg0008--no-inbody-headers | 6 ++++++
> t/t5100/msg0015--no-inbody-headers | 1 +
>
> have --no-inbody-headers in their names; wouldn't that an indication
> that they are expected output when mailinfo is run while in-body
> header feature disabled?
Yes, that's correct (they are the test data for when the in-body header
feature is disabled).
> I would have expected that it would make more sense to make no
> change to sample.mbox and have updated expectation to outputs in the
> case where in-body header feature is enabled.
The sample.mbox file contains the following:
From nobody Mon Sep 17 00:00:00 2001
From: A U Thor <a.u.thor@example.com>
Subject: check bogus body header (from)
Date: Fri, 9 Jun 2006 00:44:16 -0700
From: bogosity
- a list
- of stuff
Unchanged, the subsequent patch would break this test because it would
interpret that as a multi-line "From" in-body header when in-body
headers are *not* disabled.
Besides changing sample.mbox, the other way to make sure that this test
passes is to suppress the test when in-body headers are *not* disabled,
but looking at t5100* (directory and script), it seemed more
straightforward to modify sample.mbox.
The patch I sent added a blank line after "From: bogosity", but removing
the spaces before "- a list" and "- of stuff" would work too.
> To make sure this new feature will not break in the future, we would
> want a brand new message with a folded in-body header added to the
> sample.mbox, and see how it is parsed by mailinfo with in-body
> header feature enabled (and disabled).
OK, I'll add this test. (The subsequent patch already has the brand new
message, but not the test where in-body headers are disabled.)
next prev parent reply other threads:[~2016-09-17 0:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 19:58 [PATCH] sequencer: support folding in rfc2822 footer Jonathan Tan
2016-09-03 2:23 ` Junio C Hamano
2016-09-06 22:08 ` Jonathan Tan
2016-09-06 23:30 ` Jonathan Tan
2016-09-07 6:38 ` Jeff King
2016-09-16 17:37 ` [RFC/PATCH 0/3] handle multiline in-body headers Jonathan Tan
2016-09-16 18:29 ` Junio C Hamano
2016-09-16 17:37 ` [RFC/PATCH 1/3] mailinfo: refactor commit message processing Jonathan Tan
2016-09-16 19:12 ` Junio C Hamano
2016-09-16 21:46 ` Jeff King
2016-09-16 17:37 ` [RFC/PATCH 2/3] mailinfo: correct malformed test example Jonathan Tan
2016-09-16 19:19 ` Junio C Hamano
2016-09-16 22:42 ` Jonathan Tan
2016-09-16 22:55 ` Junio C Hamano
2016-09-17 0:31 ` Jonathan Tan [this message]
2016-09-17 3:48 ` Junio C Hamano
2016-09-16 17:37 ` [RFC/PATCH 3/3] mailinfo: handle in-body header continuations Jonathan Tan
2016-09-16 20:17 ` Junio C Hamano
2016-09-16 20:49 ` Jonathan Tan
2016-09-16 20:59 ` Junio C Hamano
2016-09-16 22:36 ` Jonathan Tan
2016-09-16 23:04 ` Junio C Hamano
2016-09-17 0:22 ` Jonathan Tan
2016-09-16 21:51 ` Jeff King
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: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a27685f-a53b-03a7-93d5-0492638faf51@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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://80x24.org/mirrors/git.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).