summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-03-02 02:43:16 (GMT)
committerSteven Knight <knight@baldmt.com>2003-03-02 02:43:16 (GMT)
commitec3e478f83215dd7487daa70f1c0287d12e82f39 (patch)
tree6135096eda6c72b844a8d95cf00e01ea77fcda17 /src/engine/SCons/EnvironmentTests.py
parentc03ac136007521fda90a7963baa4956d950b9363 (diff)
downloadSCons-ec3e478f83215dd7487daa70f1c0287d12e82f39.zip
SCons-ec3e478f83215dd7487daa70f1c0287d12e82f39.tar.gz
SCons-ec3e478f83215dd7487daa70f1c0287d12e82f39.tar.bz2
Fix using more than two targets or sources in a list.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 1163545..e590d7d 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -794,6 +794,46 @@ class EnvironmentTestCase(unittest.TestCase):
'PREFIX', 'SUFFIX',
'LIBPREFIX', 'LIBSUFFIX')
+ def test_sig_dict(self):
+ """Test the sig_dict() method"""
+ d = Environment(XYZZY = 'foo').sig_dict()
+
+ assert d['XYZZY'] == 'foo'
+
+ s = str(d['TARGET'])
+ assert s == '__t1__', s
+ s = str(d['TARGET'].dir)
+ assert s == '', s
+ s = str(d['TARGETS'])
+ assert s == '__t1__ __t2__', s
+ s = str(d['TARGETS'][1])
+ assert s == '__t2__', s
+ s = str(d['TARGETS'][2])
+ assert s == '__t3__', s
+ s = str(d['TARGETS'][87])
+ assert s == '__t88__', s
+ s = str(d['TARGETS'][87].dir)
+ assert s == '', s
+ s = map(str, d['TARGETS'][3:5])
+ assert s == ['__t4__', '__t5__'], s
+
+ s = str(d['SOURCE'])
+ assert s == '__s1__', s
+ s = str(d['SOURCE'].dir)
+ assert s == '', s
+ s = str(d['SOURCES'])
+ assert s == '__s1__ __s2__', s
+ s = str(d['SOURCES'][1])
+ assert s == '__s2__', s
+ s = str(d['SOURCES'][2])
+ assert s == '__s3__', s
+ s = str(d['SOURCES'][87])
+ assert s == '__s88__', s
+ s = str(d['SOURCES'][87].dir)
+ assert s == '', s
+ s = map(str, d['SOURCES'][3:5])
+ assert s == ['__s4__', '__s5__'], s
+
if __name__ == "__main__":
suite = unittest.makeSuite(EnvironmentTestCase, 'test_')