Re: [PATCH 11/29] grep: add a test helper function for less verbose -f \0 tests

2017-05-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> It somehow was unintuitive that 0 expected failure and 1 expected >> success, but it probably was just me. > > Except this. The wildmatch uses the same idiom, and I think it makes > sense. 1 = true, 0 = false, ... when all we wanted was > "does this match". OK.

Re: [PATCH 11/29] grep: add a test helper function for less verbose -f \0 tests

2017-05-13 Thread Ævar Arnfjörð Bjarmason
On Fri, May 12, 2017 at 7:06 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Add a helper function to make the tests which check for patterns with >> \0 in them more succinct. Right now this isn't a big win, but >> subsequent commits will add a lot more of these tests. >> >> The

Re: [PATCH 11/29] grep: add a test helper function for less verbose -f \0 tests

2017-05-11 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Add a helper function to make the tests which check for patterns with > \0 in them more succinct. Right now this isn't a big win, but > subsequent commits will add a lot more of these tests. > > The helper is based on the match() function in t3070-wildmatch.sh.

[PATCH 11/29] grep: add a test helper function for less verbose -f \0 tests

2017-05-11 Thread Ævar Arnfjörð Bjarmason
Add a helper function to make the tests which check for patterns with \0 in them more succinct. Right now this isn't a big win, but subsequent commits will add a lot more of these tests. The helper is based on the match() function in t3070-wildmatch.sh. Signed-off-by: Ævar Arnfjörð Bjarmason ---