The __gitdir() helper function shouldn't output anything if not in a git repository. The relevant tests only checked its error code, so extend them to ensure that there's no output. Signed-off-by: SZEDER Gábor <szeder@xxxxxxxxxx> --- t/t9902-completion.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 447f57b89291..1e8794747efd 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -215,8 +215,9 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' ' ( GIT_DIR="$ROOT/non-existing" && export GIT_DIR && - test_must_fail __gitdir - ) + test_must_fail __gitdir >"$actual" + ) && + test_must_be_empty "$actual" ' test_expect_success '__gitdir - gitfile in cwd' ' @@ -259,8 +260,9 @@ test_expect_success '__gitdir - not a git repository' ' cd subdir/subsubdir && GIT_CEILING_DIRECTORIES="$ROOT" && export GIT_CEILING_DIRECTORIES && - test_must_fail __gitdir - ) + test_must_fail __gitdir >"$actual" + ) && + test_must_be_empty "$actual" ' test_expect_success '__gitcomp - trailing space - options' ' -- 2.7.2.410.g92cb358 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html