]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9902-completion.sh
Merge branch 'fc/bash-completion-alias-of-alias'
[thirdparty/git.git] / t / t9902-completion.sh
index 2be9190425bb1dc6f9ab0eb1b8e030c99e0d2920..5c01c75d408955ed75384454394ad843f94d4263 100755 (executable)
@@ -2195,6 +2195,25 @@ test_expect_success 'complete files' '
        test_completion "git add mom" "momified"
 '
 
+test_expect_success "simple alias" '
+       test_config alias.co checkout &&
+       test_completion "git co m" <<-\EOF
+       master Z
+       mybranch Z
+       mytag Z
+       EOF
+'
+
+test_expect_success "recursive alias" '
+       test_config alias.co checkout &&
+       test_config alias.cod "co --detached" &&
+       test_completion "git cod m" <<-\EOF
+       master Z
+       mybranch Z
+       mytag Z
+       EOF
+'
+
 test_expect_success "completion uses <cmd> completion for alias: !sh -c 'git <cmd> ...'" '
        test_config alias.co "!sh -c '"'"'git checkout ...'"'"'" &&
        test_completion "git co m" <<-\EOF