Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2012-11-11 18:35:53 +0400
committerJunio C Hamano <gitster@pobox.com>2012-11-16 22:55:09 +0400
commit701ecdf16b3941ad1928520414942776e695308d (patch)
tree2d3cc333a2d62109493451135a7e3bc632b6717d /t/t9902-completion.sh
parent2cfceefaca16d64baecf0ba9bcd4e05229d9c31b (diff)
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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9902-completion.sh')
-rwxr-xr-xt/t9902-completion.sh6
1 files changed, 5 insertions, 1 deletions
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
}