]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9902-completion.sh
completion: complete config variables names and values for 'git clone -c'
[thirdparty/git.git] / t / t9902-completion.sh
index 43cf313a1c09ad8fb223ba775d5548c3f00c339c..9e90a64830e74d4aac38e1a97c994b9bb644e06c 100755 (executable)
@@ -1698,6 +1698,48 @@ 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 'sourcing the completion script clears cached commands' '
        __git_compute_all_commands &&
        verbose test -n "$__git_all_commands" &&
@@ -1706,7 +1748,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" &&