X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=t%2Ft0061-run-command.sh;h=17c9c0f3bb64782d86b9f15901791c4e05b9d122;hb=9b3995cee051ddced1392df1977f6fd3e4bf542f;hp=015fac8b5d077165c7f9ac8090fd4e2ac12a7cb3;hpb=f3d508f40e3d85fdbe1dafe8f33782766c88dbdd;p=thirdparty%2Fgit.git diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index 015fac8b5d..17c9c0f3bb 100755 --- a/t/t0061-run-command.sh +++ b/t/t0061-run-command.sh @@ -210,10 +210,23 @@ test_expect_success MINGW 'verify curlies are quoted properly' ' test_cmp expect actual ' -test_expect_success MINGW 'can spawn with argv[0] containing spaces' ' - cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" ./ && - test_must_fail "$PWD/test-fake-ssh$X" 2>err && - grep TRASH_DIRECTORY err +test_expect_success MINGW 'can spawn .bat with argv[0] containing spaces' ' + bat="$TRASH_DIRECTORY/bat with spaces in name.bat" && + + # Every .bat invocation will log its arguments to file "out" + rm -f out && + echo "echo %* >>out" >"$bat" && + + # Ask git to invoke .bat; clone will fail due to fake SSH helper + test_must_fail env GIT_SSH="$bat" git clone myhost:src ssh-clone && + + # Spawning .bat can fail if there are two quoted cmd.exe arguments. + # .bat itself is first (due to spaces in name), so just one more is + # needed to verify. GIT_SSH will invoke .bat multiple times: + # 1) -G myhost + # 2) myhost "git-upload-pack src" + # First invocation will always succeed. Test the second one. + grep "git-upload-pack" out ' test_done