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

Crestez Dan Leonard cdleonard at gmail.com
Sat Jan 30 22:29:45 UTC 2010


On Wed, 2010-01-27 at 23:08 +0000, Ville Skyttä wrote: 
> The following commit has been merged in the master branch:
> commit f3b791baeba58ac078147f9ff5829dd6055c7052
> Author: Ville Skyttä <ville.skytta at iki.fi>
> Date:   Thu Jan 28 01:00:20 2010 +0200
> 
>     (testsuite) Always look for command availability before testing completion.
> 
> diff --git a/test/completion/a2ps.exp b/test/completion/a2ps.exp
> index bc3b92b..ce96ad1 100644
> --- a/test/completion/a2ps.exp
> +++ b/test/completion/a2ps.exp
> @@ -1 +1,3 @@
> -source "lib/completions/a2ps.exp"
> +if {[assert_bash_type a2ps]} {
> +    source "lib/completions/a2ps.exp"
> +}; # if
... many many more ...

It might seem like a silly question, but why look for command
availability before running tests? Maybe the command is never actually
executed during the test. In that case it's possible to run it usefully
on more machines.

It seems more appropriate for the test itself to bail out if it can't
find all the prerequisites.

And even if checking command availability is useful; why do it with
several hundred almost identical files in GIT_DIR/test/completion? Can't
this check be done somewhere else? I don't understand why every test has
two files.




More information about the Bash-completion-devel mailing list