From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Brian Gernhardt <brian@gernhardtsoftware.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t6022: Use -eq not = to test output of wc -l
Date: Mon, 8 Nov 2010 22:35:38 +0100 [thread overview]
Message-ID: <AANLkTik48HPHn4Xfwn5kuS2uHenQfjTJFaXMe9iSe5vU@mail.gmail.com> (raw)
In-Reply-To: <1289251766-48316-1-git-send-email-brian@gernhardtsoftware.com>
> The alternative would be to use 3 = $(wc -l) (sans quotes), but other parts
> of the test used the -eq method.
A IMO saner alternative is to add a new test-lib.sh function for this.
E.g.:
- test 3 = "$(git ls-files -u | wc -l)" &&
- test_wc 3 "git ls-files -u" &&
We could use test_cmp or something internally so we'd get meaningful
output when those tests fail.
But this is a good fix anyway.
next prev parent reply other threads:[~2010-11-08 21:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 21:29 [PATCH] t6022: Use -eq not = to test output of wc -l Brian Gernhardt
2010-11-08 21:35 ` Ævar Arnfjörð Bjarmason [this message]
2010-11-08 21:38 ` Jonathan Nieder
2010-11-15 22:21 ` Junio C Hamano
2010-11-16 6:46 ` Bert Wesarg
2010-11-16 7:12 ` Johannes Sixt
2010-11-16 17:10 ` Jonathan Nieder
2010-11-16 19:10 ` Junio C Hamano
2010-11-16 19:23 ` Jonathan Nieder
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=AANLkTik48HPHn4Xfwn5kuS2uHenQfjTJFaXMe9iSe5vU@mail.gmail.com \
--to=avarab@gmail.com \
--cc=brian@gernhardtsoftware.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.
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 NNTP newsgroup(s).