diff options
author | Steven Knight <knight@baldmt.com> | 2004-04-02 05:15:17 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-04-02 05:15:17 (GMT) |
commit | 9175dc608055e832800472992feec71de3540f1a (patch) | |
tree | e01f6f7a9f49e22157c9d1d6c60c097e61439ef3 /test/Library.py | |
parent | 7d79f5147981e3af937f5e0293ad2a7ea8bdfd70 (diff) | |
download | SCons-9175dc608055e832800472992feec71de3540f1a.zip SCons-9175dc608055e832800472992feec71de3540f1a.tar.gz SCons-9175dc608055e832800472992feec71de3540f1a.tar.bz2 |
Allow environment substitutions when referencing libraries. (Chad Austin)
Diffstat (limited to 'test/Library.py')
-rw-r--r-- | test/Library.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Library.py b/test/Library.py index 37641a8..f22172c 100644 --- a/test/Library.py +++ b/test/Library.py @@ -126,4 +126,32 @@ test.run(arguments = '.') test.run(program = test.workpath('prog'), stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.cpp\nprog.c\n") +# Tests whether you can reference libraries with substitutions. + +test.write('SConstruct', r""" +# nrd = not referenced directly :) +Library('nrd', 'nrd.c') +p = Program('uses-nrd', 'uses-nrd.c', NRD='nrd', LIBPATH=['.'], LIBS=['$NRD']) +Default(p) +""") + +test.write('nrd.c', r""" +#include <stdio.h> +void nrd() { + puts("nrd"); +} +""") + +test.write('uses-nrd.c', r""" +void nrd(); +int main() { + nrd(); + return 0; +} +""") + +test.run() +test.run(program = test.workpath('uses-nrd'), + stdout = "nrd\n") + test.pass_test() |