Don't leak $options from iscsiadm completion, add basic test case.
This commit is contained in:
parent
e99645d2b9
commit
d6043b9609
@ -32,6 +32,7 @@ _iscsiadm()
|
|||||||
|
|
||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
|
local options
|
||||||
if [[ $COMP_CWORD -gt 1 ]] ; then
|
if [[ $COMP_CWORD -gt 1 ]] ; then
|
||||||
mode=${COMP_WORDS[2]}
|
mode=${COMP_WORDS[2]}
|
||||||
|
|
||||||
|
1
test/completion/iscsiadm.exp
Normal file
1
test/completion/iscsiadm.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions iscsiadm
|
20
test/lib/completions/iscsiadm.exp
Normal file
20
test/lib/completions/iscsiadm.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "iscsiadm --mode "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user