Re: [PATCH] completion: fix completing unstuck email alias arguments
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Dec 13, 2015, 01:00 UTC
- Message-ID
- <20151213020038.Horde.rlO28-SYLxFX00yK-iahGJs@webmail.informatik.kit.edu>
- In-Reply-To
- <CA+P7+xrHhWHp8WA8EF7jzsit50uW13=-NEzf0DwNfMyu2dckhA@mail.gmail.com>
Quoting Jacob Keller <jacob.keller@gmail.com>:
Show 11 quoted lines
> On Fri, Dec 11, 2015 at 4:18 PM, SZEDER Gábor <szeder@ira.uka.de> wrote: >> Completing unstuck form of email aliases doesn't quite work: >> >> $ git send-email --to <TAB> >> alice bob cecil >> $ git send-email --to a<TAB> >> alice bob cecil >> > > Woops. Is it possible to add a test for this case? I honestly don't > know how the tests for the completion works.
It's possible, but I'm not sure we should.
It's a common pattern throughout the completion script to call __gitcomp() (or __gitcomp_nl()) this way, out of the almost 200 callsites many look like this one. We don't test all those, because it would require a lot of tests for not that much gain in coverage in my opinion. The interesting thing that's definitely worth testing is what happens inside the command substitution that supplies the possible completion words, but your tests added to the send-email testsuite already cover that thoroughly.
Gábor