diff options
author | Steven Knight <knight@baldmt.com> | 2004-09-18 23:02:56 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-09-18 23:02:56 (GMT) |
commit | 07ba45e583a9f03e9a7b91212e165d45d1df1978 (patch) | |
tree | 96f741d3e308c022c801036190067eab0d115b20 /src/engine/SCons/ExecutorTests.py | |
parent | 0d70cbb58a33aeca99b6e0b4d2f11c93a92dd670 (diff) | |
download | SCons-07ba45e583a9f03e9a7b91212e165d45d1df1978.zip SCons-07ba45e583a9f03e9a7b91212e165d45d1df1978.tar.gz SCons-07ba45e583a9f03e9a7b91212e165d45d1df1978.tar.bz2 |
Fix --debug=explain when the action is a Python function.
Diffstat (limited to 'src/engine/SCons/ExecutorTests.py')
-rw-r--r-- | src/engine/SCons/ExecutorTests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index c4a5552..c391543 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -48,6 +48,8 @@ class MyAction: self.actions = actions def get_actions(self): return self.actions + def strfunction(self, target, source, env): + return string.join(['STRFUNCTION'] + self.actions + target + source) def genstring(self, target, source, env): return string.join(['GENSTRING'] + self.actions + target + source) def get_raw_contents(self, target, source, env): @@ -195,6 +197,14 @@ class ExecutorTestCase(unittest.TestCase): c = str(x) assert c == 'GENSTRING action1 action2 t s', c + def test_strfunction(self): + """Test the strfunction() method""" + env = MyEnvironment(S='string') + + x = SCons.Executor.Executor(MyAction(), env, [], ['t'], ['s']) + s = x.strfunction() + assert s == 'STRFUNCTION action1 action2 t s', s + def test_get_raw_contents(self): """Test fetching the raw signatures contents""" env = MyEnvironment(RC='raw contents') |