Skip to content

Commit ffae180

Browse files
committed
Merge branch 'jk/t0061-bat-test-update' into next
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
2 parents a4c755d + 3ad4921 commit ffae180

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

t/t0061-run-command.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,8 @@ test_expect_success MINGW 'can spawn .bat with argv[0] containing spaces' '
287287
rm -f out &&
288288
echo "echo %* >>out" >"$bat" &&
289289
290-
# Ask git to invoke .bat; clone will fail due to fake SSH helper
291-
test_must_fail env GIT_SSH="$bat" git clone myhost:src ssh-clone &&
292-
293-
# Spawning .bat can fail if there are two quoted cmd.exe arguments.
294-
# .bat itself is first (due to spaces in name), so just one more is
295-
# needed to verify. GIT_SSH will invoke .bat multiple times:
296-
# 1) -G myhost
297-
# 2) myhost "git-upload-pack src"
298-
# First invocation will always succeed. Test the second one.
299-
grep "git-upload-pack" out
290+
test-tool run-command run-command "$bat" "arg with spaces" &&
291+
test_grep "arg with spaces" out
300292
'
301293

302294
test_done

0 commit comments

Comments
 (0)