bugQuilt - Bugs: bug #41688, The bash completion should be...


bug #41688: The bash completion should be tested too

Submitted by:  Martin Quinson <mquinson>
Submitted on:  Tue 25 Feb 2014 02:50:41 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Mon 24 Oct 2016 10:45:11 AM UTC, comment #1:

It's been almost 3 years since a proposal was submitted on the mailing list:


It was reviewed a few months later (sorry for being slow):


There has never been any follow-up nor resubmission. Apparently the interest in this is pretty low.

Thinking about it again, I am not convinced this feature is actually desirable. Firstly, completion is not critical, it's only a bonus. Nothing really bad can happen from it being broken (as opposed to quilt itself, where a bug could cause real trouble.)

Secondly, testing coverage by humans is probably reasonably good in this area. I don't think there are so many corner cases. Also no dependencies on external tools which can behave in unexpected ways. So I would expect any problem with completion to be noticed and reported quickly by human users.

Thirdly, the most frequent change which affects completion is new options being added, or (less frequently) new commands being added. Existing test cases can't cover this by definition. Changes to existing options, even by accident, should be fairly rare, so the test cases are unlikely to catch any regression (which I consider the most valuable feature of a test suite, especially for a tool like quilt.)

Lastly, whenever we add a new option, the bash completion script should be updated accordingly. But the existing test cases will not fail if this is not done. OTOH they may fail if it is done, because then the completion output may change (new option being proposed.) This pretty much voids the point of having test cases. The main problem with the bash completion script is that it may not match the current set of commands and options implemented in quilt. But testing the completion itself does not help with this.

Therefore my conclusion is that this is more work than is worth, and I would rather not implement it.

Jean Delvare <khali>
Project Administrator
Tue 25 Feb 2014 02:50:41 PM UTC, original submission:

It would be great if it were possible to write test cases for the completion file. A very quick search on the net leads to a Python solution: http://stackoverflow.com/questions/9137245/unit-test-for-bash-completion-script

The idea is to set COMP_WORDS manually, call _quilt_completion() manually, and then check the content of COMPREPLY.

I'm not sure however that this should be included in the same test runner than the other tests.

Martin Quinson <mquinson>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by khali (Posted a comment)
  • -unavailable- added by mquinson (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 24 Oct 2016 10:45:11 AM UTCkhaliStatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup