Re: [PATCH 3/4] t6400: use test_line_count_cmd to count # of lines in stdout
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Jun 13, 2021, 07:42 UTC
- Message-ID
- <YMW21lasp0orYfjZ@danh.dev>
- In-Reply-To
- <CAPig+cRNqX3F3GmYP3X4Z-cY2aRGFac9NZ3=KymW43etNaDjEw@mail.gmail.com>
On 2021-06-12 23:39:51-0400, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 13 quoted lines
> 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/t6400-merge-df.sh b/t/t6400-merge-df.sh > > @@ -82,13 +82,13 @@ test_expect_success 'modify/delete + directory/file conflict' ' > > - test 5 -eq $(git ls-files -s | wc -l) && > > - test 4 -eq $(git ls-files -u | wc -l) && > > + test_line_count_cmd --out = 5 git ls-files -s && > > + test_line_count_cmd --out = 4 git ls-files -u && > > Nit: too many spaces before the `&&` on the second line: s/\s+/ /
Thanks, I'll update them, later. In my defence, this patch was generated mechanically with:
:%s/test \([0-9]\+\) -eq "*[$][(]\(.*\)|.*[)]"*/test_line_count_cmd --out = \1 \2/gc
I forgot to include the space after final ")"
Show 7 quoted lines
> > @@ -103,13 +103,13 @@ test_expect_success 'modify/delete + directory/file conflict; other way' ' > > - test 5 -eq $(git ls-files -s | wc -l) && > > - test 4 -eq $(git ls-files -u | wc -l) && > > + test_line_count_cmd --out = 5 git ls-files -s && > > + test_line_count_cmd --out = 4 git ls-files -u && > > Nit: too many spaces before the `&&` on both lines.
-- Danh