diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-26 21:24:56 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-26 21:24:56 +0300 |
commit | 6e08dc550474c66bc09a539d7f35d2f58891be9c (patch) | |
tree | e25f5a102028fef85c3d269d949025bb3450e3e2 | |
parent | 099b47c66d48537311d53493dca67017c2493f84 (diff) | |
download | bash-completion-6e08dc550474c66bc09a539d7f35d2f58891be9c.tar.gz |
testsuite/assert_source_completions: Test for command availability too.
We now install (_minimal) completions for just about everything, but
that doesn't mean we can sanely test everything if the command is not
available.
-rw-r--r-- | test/lib/library.exp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lib/library.exp b/test/lib/library.exp index 35eddf80..f6e9f21a 100644 --- a/test/lib/library.exp +++ b/test/lib/library.exp @@ -580,12 +580,13 @@ proc assert_no_output {{cmd} {test ""} {prompt /@}} { # Source/run file with additional tests if completion for the specified command -# is installed in bash. +# is installed in bash, and the command is available. # @param string $command Command to check completion availability for. # @param string $file (optional) File to source/run. Default is # "lib/completions/$cmd.exp". proc assert_source_completions {command {file ""}} { - if {[is_bash_completion_installed_for $command]} { + if {[assert_bash_type $command] + && [is_bash_completion_installed_for $command]} { if {[string length $file] == 0} { set file "$::srcdir/lib/completions/$command.exp" } |