]> git.ipfire.org Git - thirdparty/git.git/commit
completion: add tests for 'git config' completion
authorSZEDER Gábor <szeder.dev@gmail.com>
Tue, 13 Aug 2019 12:26:44 +0000 (14:26 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2019 19:31:04 +0000 (12:31 -0700)
commit7a09a8f093eef940eef7d012907c051974ada254
tree47a7f32b464f2cc1913478373878a8c4b2dc8202
parent840d7e5b3ca97f831b5af804a135a9cc79d9b919
completion: add tests for 'git config' completion

The next patches will change/refactor the way we complete
configuration variable names and values, so add a few tests to cover
the basics, namely the completion of matching configuration sections,
full variable names, and their values.

Note that the test checking the completion of configuration sections
is currently failing, though it's not a sign of an actual bug.  If a
section contains multiple variables, then that section is currently
repeated as many times as the number of variables in there.  This is
not a correctness issue in practice, because Bash's completion
facilities remove all repetitions anyway.  Consequently, we could list
all those repeated sections in the expected output of this test as
well, but then it would have to be updated whenever a new
configuration variable is added to those sections.  Instead, list each
matching configuration section only once, mark the test as failing for
now, and the next patch will update the completion script to avoid
those repetitions.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9902-completion.sh