diff options
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 45f5fdb..d450075 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -419,7 +419,16 @@ class EnvironmentTestCase(unittest.TestCase): def test_subst_path(self): """Test substituting a path list """ - env = Environment(FOO='foo', BAR='bar') + class MyProxy: + def __init__(self, val): + self.val = val + def get(self): + return self.val + '-proxy' + + class MyObj: + pass + + env = Environment(FOO='foo', BAR='bar', PROXY=MyProxy('my1')) r = env.subst_path('$FOO') assert r == ['foo'], r @@ -427,6 +436,11 @@ class EnvironmentTestCase(unittest.TestCase): r = env.subst_path(['$FOO', 'xxx', '$BAR']) assert r == ['foo', 'xxx', 'bar'], r + n = MyObj() + + r = env.subst_path(['$PROXY', MyProxy('my2'), n]) + assert r == ['my1-proxy', 'my2-proxy', n], r + def test_Builder_calls(self): """Test Builder calls through different environments """ |