summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-01-21 12:00:30 (GMT)
committerSteven Knight <knight@baldmt.com>2005-01-21 12:00:30 (GMT)
commit9925c571d1b4efcfba5838bf93971f98f34cc17d (patch)
tree43dc31c3adcc426161d7c53c9a60cc9ec1d5ac35 /src/engine/SCons/EnvironmentTests.py
parent7f820e64f11a4f047685713c163ca5fee35e676c (diff)
downloadSCons-9925c571d1b4efcfba5838bf93971f98f34cc17d.zip
SCons-9925c571d1b4efcfba5838bf93971f98f34cc17d.tar.gz
SCons-9925c571d1b4efcfba5838bf93971f98f34cc17d.tar.bz2
Regain lost performance improvements by using paths instead of targets for scanner calls and re-using Binder objects for identical paths.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 44dc814..3ef5e73 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -503,11 +503,14 @@ class SubstitutionTestCase(unittest.TestCase):
r = env.subst_path(['$FOO', 'xxx', '$BAR'])
assert r == ['foo', 'xxx', 'bar'], r
- r = env.subst_path(['$FOO', '$TARGET', '$BAR'])
- assert r == ['foo', '', 'bar'], r
+ r = env.subst_path(['$FOO', '$TARGET', '$SOURCE', '$BAR'])
+ assert r == ['foo', '', '', 'bar'], r
- r = env.subst_path(['$FOO', '$TARGET', '$BAR'], target=MyNode('yyy'))
- assert map(str, r) == ['foo', 'yyy', 'bar'], r
+ r = env.subst_path(['$FOO', '$TARGET', '$BAR'], target=MyNode('ttt'))
+ assert map(str, r) == ['foo', 'ttt', 'bar'], r
+
+ r = env.subst_path(['$FOO', '$SOURCE', '$BAR'], source=MyNode('sss'))
+ assert map(str, r) == ['foo', 'sss', 'bar'], r
n = MyObj()