test: Add alias-completion plugin test

pull/1627/head
Noah Gorny 2020-06-28 11:37:08 +03:00
parent a224d65f5b
commit 0053f27820
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bats
load ../test_helper
load ../../lib/composure
load ../../completion/available/git.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
}