Add unit test for this failure mode
This commit is contained in:
@@ -103,3 +103,14 @@ def test_operators_inside_eval():
|
||||
environment_dict = environment_recipe.as_dictionary(os.environ.copy())
|
||||
|
||||
assert environment_dict.get('SOMETHING') == 'a\nb\nc'
|
||||
|
||||
|
||||
def test_substitution_with_backslash():
|
||||
environment_recipe = parse_environment('PATH2="somewhere_else;$PATH1"')
|
||||
|
||||
# pass the existing process env so PATH is available
|
||||
environment_dict = environment_recipe.as_dictionary(prev_environment={
|
||||
'PATH1': 'c:\\folder\\'
|
||||
})
|
||||
|
||||
assert environment_dict.get('PATH2') == 'somewhere_else;c:\\folder\\'
|
||||
|
||||
Reference in New Issue
Block a user