completion/alias: fix tests
parent
7fcad6ed0d
commit
b0862899d7
|
|
@ -3,25 +3,26 @@
|
|||
load ../test_helper
|
||||
load ../test_helper_libs
|
||||
|
||||
# Load something, anything...
|
||||
load ../../completion/available/capistrano.completion
|
||||
|
||||
@test "alias-completion: See that aliases with double quotes and brackets do not break the plugin" {
|
||||
alias gtest="git log --graph --pretty=format:'%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset' --abbrev-commit --date=relative"
|
||||
load ../../plugins/available/alias-completion.plugin
|
||||
run load ../../completion/available/aliases.completion
|
||||
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "alias-completion: See that aliases with single quotes and brackets do not break the plugin" {
|
||||
alias gtest='git log --graph --pretty=format:"%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset" --abbrev-commit --date=relative'
|
||||
load ../../plugins/available/alias-completion.plugin
|
||||
run load ../../completion/available/aliases.completion
|
||||
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "alias-completion: See that having aliased rm command does not output unnecessary output" {
|
||||
alias rm='rm -v'
|
||||
load ../../plugins/available/alias-completion.plugin
|
||||
run load ../../completion/available/aliases.completion
|
||||
|
||||
refute_output
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# plugins
|
||||
plugins alias-completion
|
||||
plugins base
|
||||
|
||||
# completion
|
||||
completion aliases
|
||||
completion bash-it
|
||||
completion system
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# plugins
|
||||
plugins alias-completion
|
||||
plugins base
|
||||
# Bad type
|
||||
pluugins alias-completion
|
||||
compleetion aliases
|
||||
|
||||
# completion
|
||||
completion aliases
|
||||
completion bash-it
|
||||
completion system
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function local_setup {
|
|||
|
||||
assert_link_exist "$BASH_IT/enabled/150---general.aliases.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/800---aliases.completion.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/350---bash-it.completion.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/325---system.completion.bash"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ function local_setup {
|
|||
|
||||
assert_link_exist "$BASH_IT/enabled/150---general.aliases.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/800---aliases.completion.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/350---bash-it.completion.bash"
|
||||
assert_link_exist "$BASH_IT/enabled/325---system.completion.bash"
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ function local_setup {
|
|||
run _bash-it-profile-load "test"
|
||||
assert_link_not_exist "$BASH_IT/enabled/150---general.aliases.bash"
|
||||
assert_link_not_exist "$BASH_IT/enabled/250---base.plugin.bash"
|
||||
assert_link_not_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash"
|
||||
assert_link_not_exist "$BASH_IT/enabled/800---aliases.completion.bash"
|
||||
assert_link_not_exist "$BASH_IT/enabled/350---bash-it.completion.bash"
|
||||
assert_link_not_exist "$BASH_IT/enabled/325---system.completion.bash"
|
||||
}
|
||||
|
|
@ -384,7 +384,7 @@ function local_setup {
|
|||
|
||||
@test "helpers: profile load corrupted profile file: bad subdirectory" {
|
||||
run _bash-it-profile-load "test-bad-type"
|
||||
assert_line -n 1 -p "Bad line(#5) in profile, aborting load..."
|
||||
assert_line -n 1 -p "Bad line(#4) in profile, aborting load..."
|
||||
}
|
||||
|
||||
@test "helpers: profile rm sanity" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue