All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Antoine Pelisse <apelisse@gmail.com>
Cc: git@vger.kernel.org, Thomas Rast <trast@student.ethz.ch>
Subject: Re: [PATCH] tests: make sure rename pretty print works
Date: Sat, 02 Mar 2013 22:50:34 -0800	[thread overview]
Message-ID: <7vehfxc6yt.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1362235092-16914-1-git-send-email-apelisse@gmail.com> (Antoine Pelisse's message of "Sat, 2 Mar 2013 15:38:12 +0100")

Antoine Pelisse <apelisse@gmail.com> writes:

> Add basic use cases and corner cases tests for
> "git diff -M --summary/stat".
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
>  t/t4056-rename-pretty.sh |   54 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100755 t/t4056-rename-pretty.sh

I wonder if this needs a new test script of its own.

If we anticipate future additions, it would make sense but otherwise
it may be better if we can find an existing one these tests can be
folded into.

> diff --git a/t/t4056-rename-pretty.sh b/t/t4056-rename-pretty.sh
> new file mode 100755
> index 0000000..806046f
> --- /dev/null
> +++ b/t/t4056-rename-pretty.sh
> @@ -0,0 +1,54 @@
> +#!/bin/sh
> +
> +test_description='Rename pretty print
> +
> +'

A single line would be sufficient...

> +test_expect_success common_prefix '
> +	mkdir -p c/d &&
> +	git mv c/b/a c/d/e &&
> +	git commit -m. &&
> +	git show -M --summary >output &&

I guess the unsightly "commit -m." is an attempt to prevent the
later grep from matching log message randomly, but if you test the
output from "git diff -M --stat/summary HEAD^ HEAD" you do not have
to worry about it, no?

Also I wonder if we can verify the filename part in --stat output.

> +	test_i18ngrep "c/{b/a => d/e}" output

We would want to make sure that we do not have random cruft around
the paths, and the byte before that 'c' and after that '}' may want
to be verified.

  reply	other threads:[~2013-03-03  6:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-23 16:48 [PATCH] diff: Fix rename pretty-print when suffix and prefix overlap Antoine Pelisse
2013-02-24  9:15 ` Junio C Hamano
2013-02-25 19:50   ` Antoine Pelisse
2013-02-25 22:36     ` Philip Oakley
2013-02-25 22:41       ` Antoine Pelisse
2013-02-28 21:55     ` Antoine Pelisse
2013-02-28 22:14       ` Thomas Rast
2013-02-28 22:22         ` Antoine Pelisse
2013-02-28 22:29       ` Junio C Hamano
2013-03-02 14:38         ` [PATCH] tests: make sure rename pretty print works Antoine Pelisse
2013-03-03  6:50           ` Junio C Hamano [this message]
2013-03-06 21:36           ` [PATCH v2] " Antoine Pelisse
2013-03-06 22:03             ` Junio C Hamano
2013-02-26 20:47 ` [PATCH] diff: prevent pprint_rename from underrunning input Thomas Rast
2013-02-26 21:44   ` Junio C Hamano
2013-02-27 13:27     ` Antoine Pelisse

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vehfxc6yt.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=apelisse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=trast@student.ethz.ch \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.