-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Test envVarsService newline substitution behavior #17747
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
Conversation
c6e325d to
14b76e2
Compare
The behavior of interpreting "\n" inside quoted strings in env files was neither documented nor tested, so this commit modifies the unit tests to pin down that behavior. I also added a test for the example I'm proposing to add to the docs in PR microsoft/vscode-docs#4888. I also extended the test for escaping "$" to show that it works even when the "$" isn't part of something that matches SUBST_REGEX (i.e. isn't the beginning of something looking like "${...}").
14b76e2 to
a4232cd
Compare
karrtikr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kini Apologies for the late response and thanks for submitting this PR! I'll just make sure tests are passing before merging it.
|
Thanks. Keep in mind that this PR adds a test that claims it is testing an example from the docs, but the docs won't actually contain that example until microsoft/vscode-docs#4888 is merged. But that PR is closed because I wasn't sure if what I wrote in it was accurate - I'd appreciate it if you could take a look over there too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kini Thanks, you were spot on with your comments in microsoft/vscode-docs#4888 (comment), recursive substitution only works with ${...} whereas ${env:...} is only used for process env variables, so it seems documentation is inaccurate at the moment. Feel free to fix it and add the example, meanwhile I'll create an issue clarifying the usage and link it here soon, We should probably only follow the standard python-dotenv syntax on this: https://pypi.org/project/python-dotenv/
|
FYI I have created #18307 where I have clarified how things currently are. |
…vscode-python#17747) The behavior of interpreting "\n" inside quoted strings in env files was neither documented nor tested, so this commit modifies the unit tests to pin down that behavior. I also added a test for the example I'm proposing to add to the docs in PR microsoft/vscode-docs#4888. I also extended the test for escaping "$" to show that it works even when the "$" isn't part of something that matches SUBST_REGEX (i.e. isn't the beginning of something looking like "${...}").
The behavior of interpreting "\n" inside quoted strings in env files
was neither documented nor tested, so this commit modifies the unit
tests to pin down that behavior.
I also added a test for the example I'm proposing to add to the docs
in PR microsoft/vscode-docs#4888.
I also extended the test for escaping "$" to show that it works even
when the "$" isn't part of something that matches
SUBST_REGEX (i.e. isn't the beginning of something looking like
"${...}").