git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: "Git List" <git@vger.kernel.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH 4/4] t6402: use test_line_count_cmd to count # of lines in stdout
Date: Sat, 12 Jun 2021 23:43:08 -0400	[thread overview]
Message-ID: <CAPig+cS7Xh4L3YzStoU44=217jEBtFKWja7k=mTDhuHK3HBPVw@mail.gmail.com> (raw)
In-Reply-To: <20210612042755.28342-5-congdanhqx@gmail.com>

On Sat, Jun 12, 2021 at 12:28 AM Đoàn Trần Công Danh
<congdanhqx@gmail.com> wrote:
> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
> ---
> diff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh
> @@ -330,8 +320,8 @@ test_expect_success 'Rename+D/F conflict; renamed file merges but dir in way' '
> -       test 3 -eq "$(git ls-files -u | wc -l)" &&
> -       test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
> +       test_line_count_cmd --out = 3 git ls-files -u  &&
> +       test_line_count_cmd --out = 2 git ls-files -u dir/file-in-the-way  &&

Nit: too many spaces before `&&`: s/\s+/ /

> @@ -357,8 +347,8 @@ test_expect_success 'Same as previous, but merged other way' '
> -       test 3 -eq "$(git ls-files -u | wc -l)" &&
> -       test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
> +       test_line_count_cmd --out = 3 git ls-files -u  &&
> +       test_line_count_cmd --out = 2 git ls-files -u dir/file-in-the-way  &&

Ditto.

> @@ -374,8 +364,8 @@ test_expect_success 'Rename+D/F conflict; renamed file cannot merge, dir not in
> -       test 3 -eq "$(git ls-files -u | wc -l)" &&
> -       test 3 -eq "$(git ls-files -u dir | wc -l)" &&
> +       test_line_count_cmd --out = 3 git ls-files -u  &&
> +       test_line_count_cmd --out = 3 git ls-files -u dir  &&

Ditto.

> @@ -409,14 +399,15 @@ test_expect_success 'Rename+D/F conflict; renamed file cannot merge and dir in t
> -       test 5 -eq "$(git ls-files -u | wc -l)" &&
> +       test_line_count_cmd --out = 5 git ls-files -u  &&
>         if test "$GIT_TEST_MERGE_ALGORITHM" = ort
>         then
> -               test 3 -eq "$(git ls-files -u dir~HEAD | wc -l)"
> +               test_line_count_cmd --out = 3 git ls-files -u dir~HEAD
>         else
> -               test 3 -eq "$(git ls-files -u dir | grep -v file-in-the-way | wc -l)"
> +               git ls-files -u dir >out &&
> +               test_line_count_cmd --out = 3 grep -v file-in-the-way out
>         fi &&
> -       test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
> +       test_line_count_cmd --out = 2 git ls-files -u dir/file-in-the-way  &&

And again.

> @@ -432,14 +423,15 @@ test_expect_success 'Same as previous, but merged other way' '
> -       test 5 -eq "$(git ls-files -u | wc -l)" &&
> +       test_line_count_cmd --out = 5 git ls-files -u  &&

Here too.

> -       test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
> +       test_line_count_cmd --out = 2 git ls-files -u dir/file-in-the-way  &&

Blorp.

And the rest of the changes suffer the same problem, so I won't
continue commenting...

      reply	other threads:[~2021-06-13  3:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  4:27 [PATCH 0/4] t: new helper test_line_count_cmd Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 1/4] test-lib-functions: introduce test_line_count_cmd Đoàn Trần Công Danh
2021-06-13  3:10   ` Eric Sunshine
2021-06-13  7:36     ` Đoàn Trần Công Danh
2021-06-13 13:28   ` Ævar Arnfjörð Bjarmason
2021-06-13 16:37     ` Đoàn Trần Công Danh
2021-06-13 18:18     ` Phillip Wood
2021-06-13 21:42       ` Felipe Contreras
2021-06-13 23:43       ` Eric Sunshine
2021-06-14  2:56         ` Junio C Hamano
2021-06-24 23:19         ` Ævar Arnfjörð Bjarmason
2021-06-13 13:36   ` Ævar Arnfjörð Bjarmason
2021-06-14  3:01     ` Junio C Hamano
2021-06-15 15:40     ` Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 2/4] t6402: use find(1) builtin to filter instead of grep Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 3/4] t6400: use test_line_count_cmd to count # of lines in stdout Đoàn Trần Công Danh
2021-06-12  4:33   ` Bagas Sanjaya
2021-06-13  7:39     ` Đoàn Trần Công Danh
2021-06-13  3:39   ` Eric Sunshine
2021-06-13  7:42     ` Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 4/4] t6402: " Đoàn Trần Công Danh
2021-06-13  3:43   ` Eric Sunshine [this message]

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='CAPig+cS7Xh4L3YzStoU44=217jEBtFKWja7k=mTDhuHK3HBPVw@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=avarab@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).