diff options
author | Steven Knight <knight@baldmt.com> | 2002-06-05 12:52:42 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-06-05 12:52:42 (GMT) |
commit | 42717c855f7cbb73d3017ac243a34491d3cc0c53 (patch) | |
tree | 10633dfadfc6538e4902adf1c808d26209940327 /test/option--implicit-cache.py | |
parent | 96deb800e046dc86f4ce7d99350007bbce205d7e (diff) | |
download | SCons-42717c855f7cbb73d3017ac243a34491d3cc0c53.zip SCons-42717c855f7cbb73d3017ac243a34491d3cc0c53.tar.gz SCons-42717c855f7cbb73d3017ac243a34491d3cc0c53.tar.bz2 |
Fix ListBuilder so it works with --implicit-cache. (Anthony Roach)
Diffstat (limited to 'test/option--implicit-cache.py')
-rw-r--r-- | test/option--implicit-cache.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py index 704668b..6ebff3a 100644 --- a/test/option--implicit-cache.py +++ b/test/option--implicit-cache.py @@ -30,8 +30,10 @@ import TestSCons if sys.platform == 'win32': _exe = '.exe' + _obj = '.obj' else: _exe = '' + _obj = '.o' prog = 'prog' + _exe subdir_prog = os.path.join('subdir', 'prog' + _exe) @@ -58,6 +60,8 @@ def copy(target, source, env): open(str(target[0]), 'wt').write(open(str(source[0]), 'rt').read()) nodep = env.Command('nodeps.c', 'nodeps.in', action=copy) env.Program('nodeps', 'nodeps.c') + +env.Object(['one', 'two'], ['one.c']) """) test.write(['subdir', 'SConscript'], @@ -120,7 +124,12 @@ r""" #define BAR_STRING "subdir/include/bar.h 1\n" """) +test.write('one.c' , +r""" +#include <foo.h> +void one(void) { } +""") test.run(arguments = "--implicit-cache " + args) @@ -242,5 +251,19 @@ test.run(program = test.workpath(variant_prog), # test in the face of a file with no dependencies where the source file is generated: test.run(arguments = "--implicit-cache nodeps%s"%_exe) +test.write('nodeps.in', +r""" +#include <foo.h> + +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + return 0; +} +""") + +test.run(arguments = "--implicit-cache one%s"%_obj) +test.run(arguments = "--implicit-cache one%s"%_obj) test.pass_test() |