From: Felipe Contreras Date: Sun, 11 Nov 2012 14:35:53 +0000 (+0100) Subject: completion: add comment for test_completion() X-Git-Tag: v1.8.1-rc0~14^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/701ecdf16b3941ad1928520414942776e695308d?hp=2cfceefaca16d64baecf0ba9bcd4e05229d9c31b completion: add comment for test_completion() So that it's easier to understand what it does. Also, make sure we pass only the first argument for completion. Shouldn't cause any functional changes because run_completion only checks $1. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index cbd0fb66f9..5c06709ea0 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -54,10 +54,14 @@ run_completion () __git_wrap__git_main && print_comp } +# Test high-level completion +# Arguments are: +# 1: typed text so far (cur) +# 2: expected completion test_completion () { test $# -gt 1 && echo "$2" > expected - run_completion "$@" && + run_completion "$1" && test_cmp expected out }