Skip to content

Commit 701ecdf

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2cfceef commit 701ecdf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

t/t9902-completion.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@ run_completion ()
5454
__git_wrap__git_main && print_comp
5555
}
5656

57+
# Test high-level completion
58+
# Arguments are:
59+
# 1: typed text so far (cur)
60+
# 2: expected completion
5761
test_completion ()
5862
{
5963
test $# -gt 1 && echo "$2" > expected
60-
run_completion "$@" &&
64+
run_completion "$1" &&
6165
test_cmp expected out
6266
}
6367

0 commit comments

Comments
 (0)