Merge branch 'nd/interpret-trailers-docfix'
[gitweb.git] / t / t9902-completion.sh
index 6558eee4996e21a64a1b43b5d293cab683686429..43cf313a1c09ad8fb223ba775d5548c3f00c339c 100755 (executable)
@@ -1437,6 +1437,7 @@ test_expect_success 'double dash "git checkout"' '
        --guess Z
        --no-guess Z
        --no-... Z
+       --overlay Z
        EOF
 '
 
@@ -1483,6 +1484,12 @@ test_expect_success 'git --help completion' '
        test_completion "git --help core" "core-tutorial "
 '
 
+test_expect_success 'completion.commands removes multiple commands' '
+       test_config completion.commands "-cherry -mergetool" &&
+       git --list-cmds=list-mainporcelain,list-complete,config >out &&
+       ! grep -E "^(cherry|mergetool)$" out
+'
+
 test_expect_success 'setup for integration tests' '
        echo content >file1 &&
        echo more >file2 &&
@@ -1516,8 +1523,8 @@ test_expect_success 'show completes all refs' '
 
 test_expect_success '<ref>: completes paths' '
        test_completion "git show mytag:f" <<-\EOF
-       file1 Z
-       file2 Z
+       file1Z
+       file2Z
        EOF
 '
 
@@ -1526,7 +1533,7 @@ test_expect_success 'complete tree filename with spaces' '
        git add "name with spaces" &&
        git commit -m spaces &&
        test_completion "git show HEAD:nam" <<-\EOF
-       name with spaces Z
+       name with spacesZ
        EOF
 '
 
@@ -1535,8 +1542,8 @@ test_expect_success 'complete tree filename with metacharacters' '
        git add "name with \${meta}" &&
        git commit -m meta &&
        test_completion "git show HEAD:nam" <<-\EOF
-       name with ${meta} Z
-       name with spaces Z
+       name with ${meta}Z
+       name with spacesZ
        EOF
 '