diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2011-02-10 23:18:11 +0100 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2011-02-10 23:18:11 +0100 |
commit | 5993fb09d54d47cc362d979a9cc44ea6dce65b2a (patch) | |
tree | fae6dc27e661b0b5542ea7efa9fb4e7efe5fa47b /src/engine/SCons/EnvironmentTests.py | |
parent | b5754794e1f526800cc5386de55238c23a539ff4 (diff) | |
parent | 84c6f9729dbbc175431874957d0654310410bd6f (diff) |
Merge commit 'upstream/2.0.1'
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index b466498..e7a851f 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/EnvironmentTests.py 5023 2010/06/14 22:05:46 scons" +__revision__ = "src/engine/SCons/EnvironmentTests.py 5134 2010/08/16 23:02:40 bdeegan" import SCons.compat @@ -1806,6 +1806,20 @@ def exists(env): env2.Append(FLAGS = 'flag3 flag4') x = env2.get('FLAGS') assert x == ['flag1', 'flag2', 'flag3', 'flag4'], x + x = env1.get('FLAGS') + assert x == ['flag1', 'flag2'], x + + # Ensure that appending directly to a copied CLVar + # doesn't modify the original. + env1 = self.TestEnvironment(FLAGS = CLVar('flag1 flag2')) + x = env1.get('FLAGS') + assert x == ['flag1', 'flag2'], x + env2 = env1.Clone() + env2['FLAGS'] += ['flag3', 'flag4'] + x = env2.get('FLAGS') + assert x == ['flag1', 'flag2', 'flag3', 'flag4'], x + x = env1.get('FLAGS') + assert x == ['flag1', 'flag2'], x # Test that the environment stores the toolpath and # re-uses it for copies. |