diff options
author | Daniel Moody <dmoody256@gmail.com> | 2022-05-10 18:39:41 (GMT) |
---|---|---|
committer | Daniel Moody <dmoody256@gmail.com> | 2022-05-10 18:39:41 (GMT) |
commit | 70d87f61fbd923cb79dd9e37a4580b2f2dcfb000 (patch) | |
tree | 323f8e7351fe9bcfa66f7f51cad241da9cfd8eb2 | |
parent | 9ecd355fe1c76783c9b9135a65c78664a3864502 (diff) | |
download | SCons-70d87f61fbd923cb79dd9e37a4580b2f2dcfb000.zip SCons-70d87f61fbd923cb79dd9e37a4580b2f2dcfb000.tar.gz SCons-70d87f61fbd923cb79dd9e37a4580b2f2dcfb000.tar.bz2 |
updated test to test expanding differently in different actions
-rw-r--r-- | test/Actions/subst_shell_env-fixture/SConstruct | 4 | ||||
-rw-r--r-- | test/Actions/subst_shell_env.py | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/Actions/subst_shell_env-fixture/SConstruct b/test/Actions/subst_shell_env-fixture/SConstruct index bdd823e..d71017b 100644 --- a/test/Actions/subst_shell_env-fixture/SConstruct +++ b/test/Actions/subst_shell_env-fixture/SConstruct @@ -1,7 +1,7 @@ import sys def custom_environment_expansion(env, target, source): - ENV = env['ENV'] + ENV = env['ENV'].copy() ENV['EXPANDED_SHELL_VAR'] = env.subst(env['ENV']['EXPANDED_SHELL_VAR'], target=target, source=source) return ENV @@ -22,3 +22,5 @@ env.Textfile('expand_script.py', [ 'print(os.environ["NON_EXPANDED_SHELL_VAR"])', ]) env.Command('out.txt', 'expand_script.py', fr'{sys.executable} $SOURCE > $TARGET') + +env.Depends('out.txt', env.Command('out2.txt', 'expand_script.py', fr'{sys.executable} $SOURCE > $TARGET')) diff --git a/test/Actions/subst_shell_env.py b/test/Actions/subst_shell_env.py index c5e9530..9f5c5db 100644 --- a/test/Actions/subst_shell_env.py +++ b/test/Actions/subst_shell_env.py @@ -37,6 +37,7 @@ test.dir_fixture('subst_shell_env-fixture') test.run(arguments = ['-Q']) test.must_match('out.txt', f"I_got_expanded_to_out.txt{os.linesep}$EXPAND_THIS{os.linesep}") +test.must_match('out2.txt', f"I_got_expanded_to_out2.txt{os.linesep}$EXPAND_THIS{os.linesep}") test.pass_test() |