Fix test and add another more awkward example

This commit is contained in:
Joe Rickerby
2020-07-15 21:07:33 +01:00
parent 9fb748bfb0
commit 08eddeff8b
2 changed files with 20 additions and 15 deletions
+9
View File
@@ -114,3 +114,12 @@ def test_substitution_with_backslash():
})
assert environment_dict.get('PATH2') == 'somewhere_else;c:\\folder\\'
def test_awkwardly_quoted_variable():
environment_recipe = parse_environment('VAR2=something"like this""$VAR1"$VAR1$(echo "theres more")"$(echo "and more!")"')
# pass the existing process env so PATH is available
environment_dict = environment_recipe.as_dictionary({'VAR1': 'but wait'})
assert environment_dict.get('VAR2') == 'somethinglike thisbut waitbut waittheres moreand more!'