Pass PATH during command substitution test

This commit is contained in:
Joe Rickerby
2020-07-05 17:39:40 +01:00
parent cc913ee7cf
commit 833a069207
+4 -3
View File
@@ -97,8 +97,9 @@ def test_no_vars_pass_through():
def test_operators_inside_eval():
environment_recipe = parse_environment('SOMETHING="$(echo a ; echo b ; echo c)"')
environment_recipe = parse_environment('SOMETHING="$(echo a; echo b; echo c)"')
environment_dict = environment_recipe.as_dictionary({})
# pass the existing process env so PATH is available
environment_dict = environment_recipe.as_dictionary(os.environ.copy())
assert environment_dict == {'SOMETHING': 'a\nb\nc'}
assert environment_dict.get('SOMETHING') == 'a\nb\nc'