git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] tests: add initial bash completion tests

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2012, 21:42 UTC
Message-ID
<7vsjggzgd9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAMP44s0xAvc9aTeBP81tXhX6Q67+7cQ-51C1AWrKPN7bc7=JXQ@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 16 quoted lines
> On Fri, Apr 6, 2012 at 11:24 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jeff King <peff@peff.net> writes:
>>
>>> On Fri, Apr 06, 2012 at 10:28:39PM +0300, Felipe Contreras wrote:
>>>
>>>> Something is better than nothing.
>>>
>>> Yes, but...
>>
>> ;-)
>>
>> This is a good example that sometimes something is worse than nothing,
>> unless watched carefully by a competent reviewer.
>
> And this is a good example of why you shouldn't blindly trust what a
> 'competent reviewer' says, as I'm pretty sure the comment is wrong.

We run the tests under whatever is configured as SHELL_PATH, so whatever you have on #! line does not matter much (except as a documentation).

But it would not make any sense to running the bash completion tests if the shell that is running the test script is *not* bash, would it? That is the point Peff made---the primary thing his message cared about is not to cause "make test" fail when your build does not use bash to run tests.

And that seems to have escaped you.
> But hey, if you prefer nothing, fine, drop this patch;...

Adding a test for bash completion is a good thing, and blindly modifying the completion script without having good tests is a bad idea.

Just add the tests in the right way. Don't break tests for non-bash users.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 7 of 18 in “tests: add initial bash completion tests”
  1. tests: add initial bash completion testsFelipe Contreras, Apr 6, 2012
  2. Jeff KingApr 6, 2012
  3. Junio C HamanoApr 6, 2012
  4. Felipe ContrerasApr 6, 2012
  5. Jeff KingApr 6, 2012
  6. Felipe ContrerasApr 6, 2012
  7. Junio C HamanoApr 6, 2012
  8. Felipe ContrerasApr 6, 2012
  9. Jeff KingApr 6, 2012
  10. Felipe ContrerasApr 6, 2012
  11. Junio C HamanoApr 6, 2012
  12. Felipe ContrerasApr 6, 2012
  13. Jeff KingApr 6, 2012
  14. Felipe ContrerasApr 6, 2012
  15. Junio C HamanoApr 6, 2012
  16. Junio C HamanoApr 6, 2012
  17. Felipe ContrerasApr 7, 2012
  18. Jeff KingApr 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.