Test envVarsService newline substitution behavior#17747
Test envVarsService newline substitution behavior#17747karrtikr merged 1 commit intomicrosoft:mainfrom
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
|
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.
@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
"${...}").