From: Jonathan Nieder Date: Mon, 08 Nov 2010 21:38:44 GMT Subject: Re: [PATCH] t6022: Use -eq not = to test output of wc -l Message-ID: <20101108213844.GB13114@burratino> In-Reply-To: Æ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.