diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-01 10:28:19 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-01 10:28:19 -0700 |
| commit | 93841d029e2c33b2e1ff9c89a0f7a9c83e83f895 (patch) | |
| tree | f98cf75d11dc847aa4b9f2571071c2c3d989cadd | |
| parent | 9d498801a7a6ed219481361115d385698c66cec9 (diff) | |
| parent | 3ad4921838a0b118714d3d5c70ab8f31a7c38176 (diff) | |
| download | git-93841d029e2c33b2e1ff9c89a0f7a9c83e83f895.tar.xz | |
Merge branch 'jk/t0061-bat-test-update'
A test to run a .bat file with whitespaces in the name with arguments
with whitespaces in them was flaky in that sometimes it got killed
before it produced expected side effects, which has been rewritten to
make it more robust.
* jk/t0061-bat-test-update:
t0061: simplify .bat test
| -rwxr-xr-x | t/t0061-run-command.sh | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index 2f77fde0d9..60cfe65979 100755 --- a/t/t0061-run-command.sh +++ b/t/t0061-run-command.sh @@ -287,16 +287,8 @@ test_expect_success MINGW 'can spawn .bat with argv[0] containing spaces' ' 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-tool run-command run-command "$bat" "arg with spaces" && + test_grep "arg with spaces" out ' test_done |
