Fix test and add another more awkward example
This commit is contained in:
@@ -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!'
|
||||
|
||||
Reference in New Issue
Block a user