From: stevenknight Date: Sun, 8 Feb 2004 16:02:26 +0000 (+0000) Subject: Updated test for C++ files in libraries. (Chad Austin) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e872f1fff479e2b57038e111b3228abc37971442;p=scons.git Updated test for C++ files in libraries. (Chad Austin) git-svn-id: http://scons.tigris.org/svn/scons/trunk@894 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/Library.py b/test/Library.py index 2011b728..76047b8e 100644 --- a/test/Library.py +++ b/test/Library.py @@ -33,7 +33,7 @@ env = Environment(LIBS = [ 'foo1', 'libfoo2' ], LIBPATH = [ '.' ]) env.Library(target = 'foo1', source = 'f1.c') Library(target = 'libfoo2', source = Split('f2a.c f2b.c f2c.c')) -libtgt=env.Library(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c']) +libtgt=env.Library(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.cpp']) env.Program(target = 'prog', source = [ 'prog.c', libtgt ]) """) @@ -85,11 +85,12 @@ f3b(void) } """) -test.write('f3c.c', r""" -void +test.write('f3c.cpp', r""" +#include +extern "C" void f3c(void) { - printf("f3c.c\n"); + printf("f3c.cpp\n"); } """) @@ -120,6 +121,6 @@ main(int argc, char *argv[]) test.run(arguments = '.') test.run(program = test.workpath('prog'), - stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n") + stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.cpp\nprog.c\n") test.pass_test()