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: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

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


Fri 28 Oct 2016 03:00:25 PM UTC, comment #2:


I fully understand your point, and I guess that you are right. After reading your comment, I don't see no point to actually test the completion. We can definitely live with a broken completion for one release,

I even had an initial implementation of this test suite: http://sources.debian.net/src/quilt/0.63-5/debian/patches/test-completion/ (this patch is not activated in the Debian package because it was breaking things, but I can't remember what).

But anyway, I'd agree if you close this bug, or mark it wontfix.

Thanks for your analysis,

Martin Quinson <mquinson>
Project Administrator
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):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 30 Oct 2016 07:34:21 AM UTCkhaliStatusNeed Info=>Wont Fix
    Mon 24 Oct 2016 10:45:11 AM UTCkhaliStatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup1