summaryrefslogtreecommitdiff
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index e16f170..3fd836f 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/EnvironmentTests.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/EnvironmentTests.py 2013/03/03 09:48:35 garyo"
import SCons.compat
@@ -1440,6 +1440,21 @@ def exists(env):
x = s("${_concat(PRE, LIST, SUF, __env__)}")
assert x == 'preasuf prebsuf', x
+ def test_concat_nested(self):
+ "Test _concat() on a nested substitution strings."
+ e = self.TestEnvironment(PRE='pre', SUF='suf',
+ L1=['a', 'b'],
+ L2=['c', 'd'],
+ L3=['$L2'])
+ x = e.subst('$( ${_concat(PRE, L1, SUF, __env__)} $)')
+ assert x == 'preasuf prebsuf', x
+ e.AppendUnique(L1 = ['$L2'])
+ x = e.subst('$( ${_concat(PRE, L1, SUF, __env__)} $)')
+ assert x == 'preasuf prebsuf precsuf predsuf', x
+ e.AppendUnique(L1 = ['$L3'])
+ x = e.subst('$( ${_concat(PRE, L1, SUF, __env__)} $)')
+ assert x == 'preasuf prebsuf precsuf predsuf precsuf predsuf', x
+
def test_gvars(self):
"""Test the Environment gvars() method"""
env = self.TestEnvironment(XXX = 'x', YYY = 'y', ZZZ = 'z')