Don't leak $options from iscsiadm completion, add basic test case.

This commit is contained in:
Ville Skyttä 2011-01-17 22:14:18 +02:00
parent e99645d2b9
commit d6043b9609
3 changed files with 22 additions and 0 deletions

View File

@ -32,6 +32,7 @@ _iscsiadm()
$split && return 0
local options
if [[ $COMP_CWORD -gt 1 ]] ; then
mode=${COMP_WORDS[2]}

View File

@ -0,0 +1 @@
assert_source_completions iscsiadm

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "iscsiadm --mode "
sync_after_int
teardown