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>
Felipe Contreras committed
Nov 11, 2012 at 15:35 UTC
701ecdf16b3941ad1928520414942776e695308d
1 file changed
+5
-1
t/t9902-completion.sh
+5
-1
@@ -54,10 +54,14 @@ run_completion ()
54
__git_wrap__git_main && print_comp
55
}
56
57
+# Test high-level completion
58
+# Arguments are:
59
+# 1: typed text so far (cur)
60
+# 2: expected completion
61
test_completion ()
62
{
63
test $# -gt 1 && echo "$2" > expected
60
- run_completion "$@" &&
64
+ run_completion "$1" &&
65
test_cmp expected out
66
}
67