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 <sze...@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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to