From: Thomas Rast Date: Fri, 13 Apr 2012 11:33:22 GMT Subject: Re: [PATCH v2] tests: add initial bash completion tests Message-ID: <871unrzx19.fsf@thomas.inf.ethz.ch> In-Reply-To: <20120413105238.GE2164@goldbirke> SZEDER Gábor writes: > On Fri, Apr 13, 2012 at 01:34:46PM +0300, Felipe Contreras wrote: >> >> +     run_completion "git f" && >> >> +     ! grep -q -v "^f" out >> > >> > grep is not a git command, so I'm not sure, but shouldn't these use >> > 'test_must_fail grep' instead of '! grep'? >> >> I'm not sure. Junio has already queued this, maybe you should send a >> patch on top of that. > > It seems that both are used in the test suite, but '! grep' is more > common, so perhaps it's good as it is. > > $ git grep '! grep' -- t |wc -l > 136 > $ git grep 'test_must_fail grep' -- t |wc -l > 17 test_must_fail catches a segfault or other signal exit as "bad", unlike ! which would accept this. Since we trust the platform tools to work (on the grounds that you have bigger problems if they don't), ! grep is fine. -- Thomas Rast trast@{inf,student}.ethz.ch