[PATCH 1/5] completion: fix non-critical bugs in __gitcomp() tests
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Sep 28, 2012, 10:09 UTC
- Message-ID
- <1348826975-2225-1-git-send-email-szeder@ira.uka.de>
- In-Reply-To
- <20120928100530.GL10144@goldbirke>
When invoking __gitcomp() the $cur variable should hold the word to be completed, but two tests (checking the handling of prefix and suffix) set it to a bogus value.
Luckily the bogus values haven't influenced the tests' correctness, because these two tests pass the word-to-be-matched as argument to __gitcomp(), which overrides $cur anyway.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> --- t/t9902-completion.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 92d7eb47..e7657537 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -121,7 +121,7 @@ test_expect_success '__gitcomp - prefix' ' EOF ( local -a COMPREPLY && - cur="branch.me" && + cur="branch.maint.me" && __gitcomp "remote merge mergeoptions rebase " "branch.maint." "me" && IFS="$newline" && @@ -137,7 +137,7 @@ test_expect_success '__gitcomp - suffix' ' EOF ( local -a COMPREPLY && - cur="branch.me" && + cur="branch.ma" && __gitcomp "master maint next pu " "branch." "ma" "." && IFS="$newline" &&
-- 1.7.12.1.438.g7dfa67b