diff options
author | Steven Knight <knight@baldmt.com> | 2001-12-19 00:22:35 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-12-19 00:22:35 (GMT) |
commit | a6d72b6c03911a3a3142aded746d74353dc6b98d (patch) | |
tree | 2092b5999b67e551df6d3527341b798c05cfc854 /test/LIBS.py | |
parent | f524ceca04f12a1186e6c003281197ef77dc397c (diff) | |
download | SCons-a6d72b6c03911a3a3142aded746d74353dc6b98d.zip SCons-a6d72b6c03911a3a3142aded746d74353dc6b98d.tar.gz SCons-a6d72b6c03911a3a3142aded746d74353dc6b98d.tar.bz2 |
Bug fixes from Charles Crain.
Diffstat (limited to 'test/LIBS.py')
-rw-r--r-- | test/LIBS.py | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/test/LIBS.py b/test/LIBS.py index dec523d..8dac7be 100644 --- a/test/LIBS.py +++ b/test/LIBS.py @@ -25,14 +25,54 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import sys + +if sys.platform == 'win32': + _exe = '.exe' +else: + _exe = '' test = TestSCons.TestSCons() -test.pass_test() #XXX Short-circuit until this is implemented. +foo_exe = test.workpath('subdir/foo' + _exe) test.write('SConstruct', """ +SConscript('subdir/SConscript') +""") + +test.subdir('subdir') + +test.write('subdir/foo.c', r""" +void do_it(); + +int main(void) +{ + do_it(); + return 0; +} +""") + +test.write('subdir/bar.c', r""" +#include <stdio.h> + +void do_it() +{ + printf("bar.c\n"); +} +""") + +test.write('subdir/SConscript', r""" +env = Environment(LIBS=['bar'], LIBPATH = [ '#subdir' ]) +env.Library(target='bar', source='bar.c') +env.Program(target='foo', source='foo.c') """) test.run(arguments = '.') +test.run(program=foo_exe, stdout='bar.c\n') + test.pass_test() + + + + |