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

 
 

bug #41688: The bash completion should be tested too

Submitter:  Martin Quinson <mquinson>
Submitted:  Tue 25 Feb 2014 02:50:41 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Hello,

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,
Mt

Martin Quinson <mquinson>
Group 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:

http://lists.nongnu.org/archive/html/quilt-dev/2014-02/msg00050.html

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

http://lists.nongnu.org/archive/html/quilt-dev/2014-06/msg00014.html

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>
Group 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>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-30 khali StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
    2016-10-24 khali StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code