Enable/Disable with negated search feature

This commit is contained in:
Konstantin Gredeskoul
2016-05-07 06:26:30 -07:00
parent fb6a6c80c0
commit 9bb2d377a8
3 changed files with 112 additions and 32 deletions

View File

@@ -17,7 +17,16 @@ NO_COLOR=true
@test "helpers search all ruby et al" {
run _bash-it-search 'ruby' 'gem' 'bundle' 'rake' 'rails'
[[ "${lines[0]/\*/}" == 'aliases : bundler rails' ]]
[[ "${lines[1]/\*/}" == 'plugins : chruby chruby-auto ruby' ]]
[[ "${lines[2]/\*/}" == 'completions : bundler gem rake' ]]
[[ "${lines[0]//}" == ' aliases => bundler rails' ]]
[[ "${lines[1]//}" == ' plugins => chruby chruby-auto ruby' ]]
[[ "${lines[2]//}" == ' completions => bundler gem rake' ]]
}
@test "search enable and disable" {
run _bash-it-search 'ruby' 'gem' 'bundle' 'rake' 'rails' '--disable'
run _enable-alias 'rails'
run _bash-it-search 'ruby' 'gem' 'bundle' 'rake' 'rails'
[[ "${lines[0]}" == ' aliases => bundler ✓rails' ]]
[[ "${lines[1]}" == ' plugins => chruby chruby-auto ruby' ]]
[[ "${lines[2]}" == ' completions => bundler gem rake' ]]
}