| Index: recipe_modules/context/tests/env.py
|
| diff --git a/recipe_modules/context/tests/env.py b/recipe_modules/context/tests/env.py
|
| index 817050a199d4f9ed001d5b2e33e1cedd08fd14e1..3c6ac93b4aadcf34015a45c54a6393e0e0644b57 100644
|
| --- a/recipe_modules/context/tests/env.py
|
| +++ b/recipe_modules/context/tests/env.py
|
| @@ -18,6 +18,28 @@ def RunSteps(api):
|
| with api.context(env={"SOMETHING_ELSE": "0"}):
|
| api.step('with 2 envs', ['echo', 'hello'])
|
|
|
| + with api.context(env={'FOO': 'bar'}):
|
| + api.step('env step', ['bash', '-c', 'echo $FOO'])
|
| +
|
| + base_path = 'foo%s%%(FOO)s%sbaz' % (api.path.pathsep, api.path.pathsep)
|
| + with api.context(env={'FOO': base_path}):
|
| + api.step('env step augmented', ['bash', '-c', 'echo $FOO'])
|
| +
|
| + pants = api.path['start_dir'].join('pants')
|
| + shirt = api.path['start_dir'].join('shirt')
|
| + with api.context(env={
|
| + 'FOO': api.context.Prefix(pants, shirt, pants, shirt)}):
|
| + with api.context(env={
|
| + 'FOO': api.context.Suffix(pants, shirt, pants, shirt)}):
|
| + api.step('env step with prefix and suffix',
|
| + ['bash', '-c', 'echo $FOO'])
|
| +
|
| + # Can set the path of default environment variables.
|
| + with api.context(env={'FOO': api.context.Prefix(shirt)}):
|
| + api.step('env with default value',
|
| + ['bash', '-c', 'echo $FOO'])
|
| +
|
| +
|
| def GenTests(api):
|
| yield api.test('basic')
|
|
|
|
|