From: Derrick Stolee <stolee@gmail.com>
To: Barret Rhoden <brho@google.com>, GIT Mailing-list <git@vger.kernel.org>
Cc: michael@platin.gs, Jonathan Tan <jonathantanmy@google.com>
Subject: Re: Git Test Coverage Report (Thursday, May 30th)
Date: Tue, 4 Jun 2019 20:57:13 -0400 [thread overview]
Message-ID: <9018d6bb-3bc1-824d-e61e-e37bb1587640@gmail.com> (raw)
In-Reply-To: <09bc8c7a-bab5-7cdb-75dc-f7c45a4dbaf8@google.com>
On 6/4/2019 4:41 PM, Barret Rhoden wrote:
> Hi -
>
> On 6/4/19 12:38 PM, Barret Rhoden wrote:
> However, the only thing we are really testing is that git blame didn't crash.
This would not be enough.
> There is no detectable change to the output. AFAIK, blame_coalesce() is a performance enhancement.
Thank you for stating that the output didn't change. I
tested this locally, and did see that the behavior was
identical.
I think you should just make the test be complete by
checking a post-condition. Please see the inserted lines
below (which _should_ work, I haven't actually ran this
in the test suite).
> +test_expect_success 'blame coalesce' '
> + cat >giraffe <<-\EOF &&
> + ABC
> + DEF
> + EOF
> + git add giraffe &&
> + git commit -m "original file" &&
oid=$(git rev-parse HEAD) &&
> +
> + cat >giraffe <<-\EOF &&
> + ABC
> + XXX
> + DEF
> + EOF
> + git add giraffe &&
> + git commit -m "interior XXX line" &&
> +
> + cat >giraffe <<-\EOF &&
> + ABC
> + DEF
> + EOF
> + git add giraffe &&
> + git commit -m "same contents as original" &&
> +
cat >expect <<-\EOF &&
^$oid 1) ABC
^$oid 2) DEF
EOF
git -c core.abbrev=40 blame -s giraffe >actual &&
test_cmp expect actual
> +'
> +
> test_done
>
next prev parent reply other threads:[~2019-06-05 0:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 12:52 Git Test Coverage Report (Thursday, May 30th) Derrick Stolee
2019-05-30 18:24 ` Derrick Stolee
2019-05-31 17:51 ` Derrick Stolee
2019-05-31 18:59 ` Johannes Schindelin
2019-06-01 21:22 ` Michael Platings
2019-06-03 18:11 ` Barret Rhoden
2019-06-03 18:40 ` Derrick Stolee
2019-06-04 16:38 ` Barret Rhoden
2019-06-04 20:41 ` Barret Rhoden
2019-06-05 0:57 ` Derrick Stolee [this message]
2019-06-10 15:15 ` Barret Rhoden
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=9018d6bb-3bc1-824d-e61e-e37bb1587640@gmail.com \
--to=stolee@gmail.com \
--cc=brho@google.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=michael@platin.gs \
/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).