summaryrefslogtreecommitdiff
path: root/t/t9902-completion.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t9902-completion.sh')
-rwxr-xr-xt/t9902-completion.sh65
1 files changed, 64 insertions, 1 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 43cf313..5d98d66 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -1698,6 +1698,69 @@ do
'
done
+test_expect_success 'git config - section' '
+ test_completion "git config br" <<-\EOF
+ branch.Z
+ browser.Z
+ EOF
+'
+
+test_expect_success 'git config - variable name' '
+ test_completion "git config log.d" <<-\EOF
+ log.date Z
+ log.decorate Z
+ EOF
+'
+
+test_expect_success 'git config - value' '
+ test_completion "git config color.pager " <<-\EOF
+ false Z
+ true Z
+ EOF
+'
+
+test_expect_success 'git -c - section' '
+ test_completion "git -c br" <<-\EOF
+ branch.Z
+ browser.Z
+ EOF
+'
+
+test_expect_success 'git -c - variable name' '
+ test_completion "git -c log.d" <<-\EOF
+ log.date=Z
+ log.decorate=Z
+ EOF
+'
+
+test_expect_success 'git -c - value' '
+ test_completion "git -c color.pager=" <<-\EOF
+ false Z
+ true Z
+ EOF
+'
+
+test_expect_success 'git clone --config= - section' '
+ test_completion "git clone --config=br" <<-\EOF
+ branch.Z
+ browser.Z
+ EOF
+'
+
+test_expect_success 'git clone --config= - variable name' '
+ test_completion "git clone --config=log.d" <<-\EOF
+ log.date=Z
+ log.decorate=Z
+ EOF
+'
+
+test_expect_success 'git clone --config= - value' '
+ test_completion "git clone --config=color.pager=" <<-\EOF
+ false Z
+ true Z
+ EOF
+'
+
test_expect_success 'sourcing the completion script clears cached commands' '
__git_compute_all_commands &&
verbose test -n "$__git_all_commands" &&
@@ -1706,7 +1769,7 @@ test_expect_success 'sourcing the completion script clears cached commands' '
'
test_expect_success 'sourcing the completion script clears cached merge strategies' '
- GIT_TEST_GETTEXT_POISON= &&
+ GIT_TEST_GETTEXT_POISON=false &&
__git_compute_merge_strategies &&
verbose test -n "$__git_merge_strategies" &&
. "$GIT_BUILD_DIR/contrib/completion/git-completion.bash" &&