[PATCH v2 1/6] completion: add comment for test_completion()
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Nov 11, 2012, 14:35 UTC
- Message-ID
- <1352644558-9410-2-git-send-email-felipe.contreras@gmail.com>
- In-Reply-To
- <1352644558-9410-1-git-send-email-felipe.contreras@gmail.com>
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 <felipe.contreras@gmail.com> --- t/t9902-completion.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index cbd0fb6..5c06709 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 }
-- 1.8.0