For testing non-core files, just `load ../test_helper_libs` after `load ../test_helper` instead of trying to guess which libs must be loaded, in which order, for testing to succeed. `_command_exists` spews log messages, so our test log is littered with `_log_debug not found`. This fixes that too.
28 lines
987 B
Bash
28 lines
987 B
Bash
#!/usr/bin/env bats
|
|
|
|
load ../test_helper
|
|
load ../test_helper_libs
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
refute_output
|
|
}
|