test/aliases: adopt newly revamped `setup()`
parent
fd91211704
commit
beac9c430a
|
|
@ -1,28 +1,30 @@
|
|||
#!/usr/bin/env bats
|
||||
# shellcheck shell=bats
|
||||
|
||||
load ../test_helper
|
||||
load ../test_helper_libs
|
||||
load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash"
|
||||
|
||||
function local_setup_file() {
|
||||
setup_libs "helpers"
|
||||
# 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"
|
||||
run load ../../completion/available/aliases.completion
|
||||
run load "${BASH_IT?}/completion/available/aliases.completion.bash"
|
||||
|
||||
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'
|
||||
run load ../../completion/available/aliases.completion
|
||||
run load "${BASH_IT?}/completion/available/aliases.completion.bash"
|
||||
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "alias-completion: See that having aliased rm command does not output unnecessary output" {
|
||||
alias rm='rm -v'
|
||||
run load ../../completion/available/aliases.completion
|
||||
run load "${BASH_IT?}/completion/available/aliases.completion.bash"
|
||||
|
||||
refute_output
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue