From 0053f2782047c93d27f61c9eb57586b0b0df878e Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Sun, 28 Jun 2020 11:37:08 +0300 Subject: [PATCH] test: Add alias-completion plugin test --- test/plugins/alias-completion.plugin.bats | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/plugins/alias-completion.plugin.bats diff --git a/test/plugins/alias-completion.plugin.bats b/test/plugins/alias-completion.plugin.bats new file mode 100644 index 00000000..08efb1ff --- /dev/null +++ b/test/plugins/alias-completion.plugin.bats @@ -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 +}