diff options
author | Steven Knight <knight@baldmt.com> | 2004-04-02 03:49:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-04-02 03:49:02 (GMT) |
commit | 9c4625382959ec8dbd113beb75cf5eac1f1cde7c (patch) | |
tree | 901065967750b3278a55cafbe343fd198ca3843c /src/engine/SCons/UtilTests.py | |
parent | 25b984647e137b2b63c2a32e791c95c7cc2fedae (diff) | |
download | SCons-9c4625382959ec8dbd113beb75cf5eac1f1cde7c.zip SCons-9c4625382959ec8dbd113beb75cf5eac1f1cde7c.tar.gz SCons-9c4625382959ec8dbd113beb75cf5eac1f1cde7c.tar.bz2 |
Fix Command() when not called through an Environment.
Diffstat (limited to 'src/engine/SCons/UtilTests.py')
-rw-r--r-- | src/engine/SCons/UtilTests.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py index 38e8c30..098c2d9 100644 --- a/src/engine/SCons/UtilTests.py +++ b/src/engine/SCons/UtilTests.py @@ -429,7 +429,7 @@ class UtilTestCase(unittest.TestCase): else: raise AssertionError, "did not catch expected UserError" - # Test we handle overriding the internal conversion routines. + # Test how we handle overriding the internal conversion routines. def s(obj): return obj @@ -451,6 +451,13 @@ class UtilTestCase(unittest.TestCase): #func = scons_subst("$FUNCTION", env, mode=SUBST_SIG, call=None) #assert func is function_foo, func + # Test supplying an overriding gvars dictionary. + env = DummyEnv({'XXX' : 'xxx'}) + result = scons_subst('$XXX', env) + assert result == 'xxx', result + result = scons_subst('$XXX', env, gvars={'XXX' : 'yyy'}) + assert result == 'yyy', result + def test_subst_list(self): """Testing the scons_subst_list() method...""" class MyNode(DummyNode): @@ -797,6 +804,13 @@ class UtilTestCase(unittest.TestCase): node = scons_subst_list("$NODE", env, mode=SUBST_SIG, conv=s) assert node == [[n1]], node + # Test supplying an overriding gvars dictionary. + env = DummyEnv({'XXX' : 'xxx'}) + result = scons_subst_list('$XXX', env) + assert result == [['xxx']], result + result = scons_subst_list('$XXX', env, gvars={'XXX' : 'yyy'}) + assert result == [['yyy']], result + def test_subst_once(self): """Testing the scons_subst_once() method""" |