diff options
author | Steven Knight <knight@baldmt.com> | 2004-02-08 14:54:08 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-02-08 14:54:08 (GMT) |
commit | 00b13793fe88c9d101c3a73a6809e86298ed3186 (patch) | |
tree | ddfa6fe29059052420d8203bbb6d63ba0067d7ba /test/overrides.py | |
parent | 18876ab2a7399e97fa1663b64d917fbfeba57cca (diff) | |
download | SCons-00b13793fe88c9d101c3a73a6809e86298ed3186.zip SCons-00b13793fe88c9d101c3a73a6809e86298ed3186.tar.gz SCons-00b13793fe88c9d101c3a73a6809e86298ed3186.tar.bz2 |
Deprecate the overrides Builder() keyword argument in favor of specifying values directly as keyword arguments, like we do for other functions and methods.
Diffstat (limited to 'test/overrides.py')
-rw-r--r-- | test/overrides.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/test/overrides.py b/test/overrides.py index f1a22be..d9b6fde 100644 --- a/test/overrides.py +++ b/test/overrides.py @@ -36,17 +36,29 @@ python = TestSCons.python test.write('SConstruct', """ env = Environment(LIBS=['a']) def build(target, source, env): - assert env['CC'] == 'mycc' - assert env['LIBS'] == ['a','b'] -builder = Builder(action=build) + print "env['CC'] =", env['CC'] + print "env['LIBS'] =", env['LIBS'] +builder = Builder(action=build, CC='buildcc', LIBS='buildlibs') env['BUILDERS']['Build'] = builder -Default(env.Build('foo', 'bar', CC='mycc', LIBS = env['LIBS']+['b'])) +foo = env.Build('foo.out', 'foo.in', CC='mycc', LIBS = env['LIBS']+['b']) +bar = env.Build('bar.out', 'bar.in') +Default([foo, bar]) +""") + +test.write('foo.in', "foo.in\n") +test.write('bar.in', "bar.in\n") + +test.run(arguments = "-Q", stdout = """\ +build("foo.out", "foo.in") +env['CC'] = mycc +env['LIBS'] = ['a', 'b'] +build("bar.out", "bar.in") +env['CC'] = buildcc +env['LIBS'] = buildlibs """) -test.write('bar', "bar\n") -test.run() test.write('SConstruct', """ env = Environment() @@ -75,5 +87,3 @@ assert test.read('hello.not_exe') == 'this is not a program!' test.up_to_date(arguments='hello.not_exe') test.pass_test() - - |