Re: [PATCH] t5801: properly test the test shell
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:01
Michael J Gruber [off-list ref] writes:
quoted
It is a separate issue to port git-remote-testgit to POSIX (J6t already has a two part draft), move it to git-remote-testgit.sh, and get its shebang line preprocessed like all other shell scripts. I think it is worth doing. Takers?
By the way, this hint still stands ;-)
quoted
t/t5801-remote-helpers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 4dcf744..c956abd 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh@@ -118,7 +118,9 @@ test_expect_success 'pushing without refspecs' ' (cd local2 && echo content >>file && git commit -a -m ten && - GIT_REMOTE_TESTGIT_REFSPEC="" test_must_fail git push 2>../error) && + GIT_REMOTE_TESTGIT_REFSPEC="" && + export GIT_REMOTE_TESTGIT_REFSPEC && + test_must_fail git push 2>../error) && grep "remote-helper doesn.t support push; refspec needed" error 'Perfect, I just failed to notice that the subshell would make the export local to that test.
Good. I think I queued the fix near the tip of that topic yesterday.