- Add an optional sort function argument to the GenerateHelpText()
Options function.
+ - Evaluate the "varlist" variables when computing the signature of a
+ function action.
+
From Charles Crain:
- Parse the source .java files for class names (including inner class
except:
# "self.execfunction" is a callable object.
code = self.execfunction.__call__.im_func.func_code.co_code
- return str(code) + string.join(map(lambda v, e=env: str(e[v]),
- self.varlist))
+ return str(code) + env.subst(string.join(map(lambda v: '${'+v+'}',
+ self.varlist)))
class ListAction(ActionBase):
"""Class for lists of other actions."""
return s
try:
if s[0] == '$':
- return self.d.get(s[1:], '')
+ if s[1] == '{':
+ return self.d.get(s[2:-1], '')
+ else:
+ return self.d.get(s[1:], '')
except IndexError:
pass
return self.d.get(s, s)
c = a.get_contents(target=[], source=[], env=Environment())
assert c == "\177\036\000\177\037\000d\000\000S", repr(c)
+ a = SCons.Action.FunctionAction(Func, varlist=['XYZ'])
+ c = a.get_contents(target=[], source=[], env=Environment())
+ assert c == "\177\036\000\177\037\000d\000\000S", repr(c)
+ c = a.get_contents(target=[], source=[], env=Environment(XYZ = 'foo'))
+ assert c == "\177\036\000\177\037\000d\000\000Sfoo", repr(c)
+
class ListActionTestCase(unittest.TestCase):
def test_init(self):