Replaced reload section with proper function.

Added completion for reload.
Fixed order in completion
Added unit tests for completion
The variable BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE has to be unset.
This commit is contained in:
Piotr Rogoża
2018-04-17 23:48:33 +02:00
parent b1dbf2f7e0
commit 89d1661d23
8 changed files with 33 additions and 42 deletions

View File

@@ -99,32 +99,32 @@ function __check_completion () {
@test "completion bash-it: show options" {
run __check_completion 'bash-it '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: bash-ti - show options" {
run __check_completion 'bash-ti '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: shit - show options" {
run __check_completion 'shit '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: bashit - show options" {
run __check_completion 'bashit '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: batshit - show options" {
run __check_completion 'batshit '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: bash_it - show options" {
run __check_completion 'bash_it '
assert_line -n 0 "disable enable help migrate search show update version"
assert_line -n 0 "disable enable help migrate reload search show update version"
}
@test "completion bash-it: show - show options" {

View File

@@ -5,5 +5,5 @@ load ../../lib/composure
@test "lib composure: composure_keywords()" {
run composure_keywords
assert_output "about author example group param version"
assert_output "about author example group param reload version"
}

View File

@@ -4,6 +4,7 @@ unset NGINX_PATH
unset IRC_CLIENT
unset TODO
unset SCM_CHECK
unset BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE
BASH_IT_TEST_DIR="${BATS_TMPDIR}/.bash_it"