]> git.ipfire.org Git - thirdparty/git.git/commit
t0061: fix test for argv[0] with spaces (MINGW only)
authorAlexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Tue, 1 Oct 2019 11:41:05 +0000 (04:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Oct 2019 06:14:51 +0000 (15:14 +0900)
commit71f4960b9190eecbc0a053dcb94a93d21780ca3a
treea6ce8b63097b5c02e8a42276315cfdade607ec79
parenteb7c78631445f35737d059bea23174d972cf7ca3
t0061: fix test for argv[0] with spaces (MINGW only)

The test was originally designed for the case where user reported
that setting GIT_SSH to a .bat file with spaces in path fails on
Windows: https://github.com/git-for-windows/git/issues/692

The test has two different problems:

1. It succeeds with AND without fix eb7c7863 that addressed user's
   problem. This happens because the core problem was misunderstood,
   leading to conclusion that git is unable to start any programs with
   spaces in path on Win7. But in fact
     a) Bug only affected cmd.exe scripts, such as .bat scripts
     b) Bug only happened when cmd.exe received at least two quoted args
     c) Bug happened on any Windows (verified on Win10).
   Therefore, correct test must involve .bat script and two quoted args.
2. In Visual Studio build, it fails to run, because 'test-fake-ssh.exe'
   is copied away from its dependencies 'libiconv.dll' and 'zlib1.dll'.

Fix both problems by using .bat script instead of 'test-fake-ssh.exe'.
NOTE: With this change, the test now correctly fails without eb7c7863.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0061-run-command.sh