[Bash-completion-devel] [Bash-completion-commits] e7d7ae81 (testsuite) Always look for command availability before testing completion.

Ville Skyttä ville.skytta at iki.fi
Sun Jan 31 23:02:53 UTC 2010


On Sunday 31 January 2010, Freddy Vulto wrote:

> I agree with your first point though, some completions work without calling
>  the actual command, so it's not always necessary to test if the command is
>  really available.

Well, I could not find any indication of this intent, the vast majority of 
checks were already checking for the command's existence, and some of the ones 
that I added the check for in this commit were actually failing in one of my 
test setups without it being done.

> I think the tests in `completion/foo' for now should reflect the use of
>  `have <command> && ...' on the bash-side.

Wouldn't it be more appropriate to check "do we have completion for command 
foo installed" instead of checking "do we have command foo installed" before 
invoking the tests?  There are some other considerations besides command 
availability (uname, userland, maybe others) in the equation.  For example 
look for "complete -p foo" exit status to see if we have completion for 
command foo installed.

> , the test `completion/perldoc' should test for the availibility of *perl*
>  and not *perldoc*

Well, IMHO both contrib/perl and test/completion/perldoc should check for both 
perl and perldoc availability... no need to define _perldoc() if perldoc is 
not installed.



More information about the Bash-completion-devel mailing list