-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows test scripts don't escape commas properly #115556
Labels
Comments
ambv
added a commit
to ambv/cpython
that referenced
this issue
Feb 16, 2024
…t and rt.bat This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax.
ambv
added a commit
to ambv/cpython
that referenced
this issue
Feb 16, 2024
…t and rt.bat This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax.
ambv
added a commit
that referenced
this issue
Feb 16, 2024
…rt.bat (#115557) This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax. Additionally, this change works around comma being treated as a parameter delimiter in test.bat by escaping commas at time of parsing. Tested combinations of rt and regrtest arguments, all seems to work as before but now you can specify commas in arguments like "-uall,extralargefile".
woodruffw
pushed a commit
to woodruffw-forks/cpython
that referenced
this issue
Mar 4, 2024
…t and rt.bat (python#115557) This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax. Additionally, this change works around comma being treated as a parameter delimiter in test.bat by escaping commas at time of parsing. Tested combinations of rt and regrtest arguments, all seems to work as before but now you can specify commas in arguments like "-uall,extralargefile".
Closing because the PR has been merged. Please re-open if there's more needed here. |
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
…t and rt.bat (python#115557) This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax. Additionally, this change works around comma being treated as a parameter delimiter in test.bat by escaping commas at time of parsing. Tested combinations of rt and regrtest arguments, all seems to work as before but now you can specify commas in arguments like "-uall,extralargefile".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Windows batch file execution, a comma is one of the magic parameter delimiters. To pass a comma as parameter data, you have to use string quotes around that parameter, like:
However, now the quotes become part of the parameter. Inside
test.bat
we employ some command-line parsing and shifting, which requires us to remove the quotes from parameters, if any, for the code to continue working.This is doubly complicated by the fact that
test.bat
passes execution tort.bat
, which does similar parsing there. The fix is needed there, too.Linked PRs
The text was updated successfully, but these errors were encountered: