Mercurial > hg-stable
changeset 38156:f44306940c94
tests: stabilize test-patch.t on Windows
$PYTHON needs to be quoted when invoking with cmd.exe, because the value expands
to c:/Python27/python.exe, which seems to be interpreted as 'c' being a command.
We can't just convert to '\', because there are a few places that run $PYTHON
directly in MSYS. If unquoted there, it results in c:Python27python.exe being
run. I wonder if we should bake the quotes into the environment variable to
avoid this.
It also wasn't happy with the quoting around exit1.py:
c:/Python27/python.exe: can't open file ''$TESTTMP/d/exit1.py'': [Errno 22] Invalid argument
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 May 2018 23:05:18 -0400 |
parents | 26b73fad45d9 |
children | 282f3daac1d7 |
files | tests/test-patch.t |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-patch.t Mon May 21 23:04:28 2018 -0400 +++ b/tests/test-patch.t Sun May 20 23:05:18 2018 -0400 @@ -97,7 +97,7 @@ > sys.exit(1) > EOF - $ hg import ../c/p --config ui.patch="$PYTHON '`pwd`/exit1.py'" + $ hg import ../c/p --config ui.patch="\"$PYTHON\" \"`pwd`/exit1.py\"" applying ../c/p abort: patch command failed: exited with status 1 [255]