diff options
| author | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-11-02 20:27:42 (GMT) |
|---|---|---|
| committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-11-02 20:27:42 (GMT) |
| commit | cc202cdc15cd156c458ad9a2f94b2e9145be3ec2 (patch) | |
| tree | 69c4681b26c8c9d2e94d7c7d24bbe764ec19e4ad /src/engine/SCons/EnvironmentTests.py | |
| parent | 6660a1b75c021994ccf352bb5314935d533b7994 (diff) | |
| parent | 54eaf41e5eadd05c73b0ad21223f73c4ed47684f (diff) | |
| download | SCons-cc202cdc15cd156c458ad9a2f94b2e9145be3ec2.zip SCons-cc202cdc15cd156c458ad9a2f94b2e9145be3ec2.tar.gz SCons-cc202cdc15cd156c458ad9a2f94b2e9145be3ec2.tar.bz2 | |
Merge pull request #88: various usability enhancements
* Allow multiple --debug= values
* Add support for a readonly cache (--cache-readonly)
* Always print stats if requested
* Generally try harder to print out a message on build errors
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
| -rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index db788dc..7fa8af4 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -170,7 +170,7 @@ class TestEnvironmentFixture(object): single_source = 1) kw['BUILDERS'] = {'Object' : static_obj} static_obj.add_action('.cpp', 'fake action') - + env = Environment(*args, **kw) return env @@ -1722,7 +1722,7 @@ def exists(env): assert env['DDD1'] == ['c', 'a', 'b'], env['DDD1'] # a & b move to end env.AppendUnique(DDD1 = ['e','f', 'e'], delete_existing=1) assert env['DDD1'] == ['c', 'a', 'b', 'f', 'e'], env['DDD1'] # add last - + env['CLVar'] = CLVar([]) env.AppendUnique(CLVar = 'bar') result = env['CLVar'] @@ -2030,7 +2030,7 @@ def generate(env): try: save_command = [] - env.backtick = my_backtick(save_command, + env.backtick = my_backtick(save_command, "-I/usr/include/fum -I bar -X\n" + \ "-L/usr/fax -L foo -lxxx -l yyy " + \ "-Wa,-as -Wl,-link " + \ @@ -2375,7 +2375,7 @@ f5: \ env.PrependUnique(DDD1 = ['a','c'], delete_existing=1) assert env['DDD1'] == ['a', 'c', 'b'], env['DDD1'] # a & c move to front env.PrependUnique(DDD1 = ['d','e','d'], delete_existing=1) - assert env['DDD1'] == ['d', 'e', 'a', 'c', 'b'], env['DDD1'] + assert env['DDD1'] == ['d', 'e', 'a', 'c', 'b'], env['DDD1'] env['CLVar'] = CLVar([]) @@ -3125,6 +3125,29 @@ def generate(env): assert t[4].path == 'p_ggg' assert t[4].precious + def test_Pseudo(self): + """Test the Pseudo() method""" + env = self.TestEnvironment(FOO='ggg', BAR='hhh') + env.Dir('p_hhhb') + env.File('p_d') + t = env.Pseudo('p_a', 'p_${BAR}b', ['p_c', 'p_d'], 'p_$FOO') + + assert t[0].__class__.__name__ == 'Entry', t[0].__class__.__name__ + assert t[0].path == 'p_a' + assert t[0].pseudo + assert t[1].__class__.__name__ == 'Dir', t[1].__class__.__name__ + assert t[1].path == 'p_hhhb' + assert t[1].pseudo + assert t[2].__class__.__name__ == 'Entry', t[2].__class__.__name__ + assert t[2].path == 'p_c' + assert t[2].pseudo + assert t[3].__class__.__name__ == 'File', t[3].__class__.__name__ + assert t[3].path == 'p_d' + assert t[3].pseudo + assert t[4].__class__.__name__ == 'Entry', t[4].__class__.__name__ + assert t[4].path == 'p_ggg' + assert t[4].pseudo + def test_Repository(self): """Test the Repository() method.""" class MyFS(object): |
