From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Brian Gernhardt <brian@gernhardtsoftware.com>,
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 15:38:44 -0600 [thread overview]
Message-ID: <20101108213844.GB13114@burratino> (raw)
In-Reply-To: <AANLkTik48HPHn4Xfwn5kuS2uHenQfjTJFaXMe9iSe5vU@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
>> 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.
See http://thread.gmane.org/gmane.comp.version-control.git/157903/focus=160421
for example.
next prev parent reply other threads:[~2010-11-08 21:39 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
2010-11-08 21:38 ` Jonathan Nieder [this message]
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=20101108213844.GB13114@burratino \
--to=jrnieder@gmail.com \
--cc=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