File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -210,10 +210,23 @@ test_expect_success MINGW 'verify curlies are quoted properly' '
210
210
test_cmp expect actual
211
211
'
212
212
213
- test_expect_success MINGW ' can spawn with argv[0] containing spaces' '
214
- cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" ./ &&
215
- test_must_fail "$PWD/test-fake-ssh$X" 2>err &&
216
- grep TRASH_DIRECTORY err
213
+ test_expect_success MINGW ' can spawn .bat with argv[0] containing spaces' '
214
+ bat="$TRASH_DIRECTORY/bat with spaces in name.bat" &&
215
+
216
+ # Every .bat invocation will log its arguments to file "out"
217
+ rm -f out &&
218
+ echo "echo %* >>out" >"$bat" &&
219
+
220
+ # Ask git to invoke .bat; clone will fail due to fake SSH helper
221
+ test_must_fail env GIT_SSH="$bat" git clone myhost:src ssh-clone &&
222
+
223
+ # Spawning .bat can fail if there are two quoted cmd.exe arguments.
224
+ # .bat itself is first (due to spaces in name), so just one more is
225
+ # needed to verify. GIT_SSH will invoke .bat multiple times:
226
+ # 1) -G myhost
227
+ # 2) myhost "git-upload-pack src"
228
+ # First invocation will always succeed. Test the second one.
229
+ grep "git-upload-pack" out
217
230
'
218
231
219
232
test_done
You can’t perform that action at this time.
0 commit comments