summaryrefslogtreecommitdiffstats
path: root/test/CPPDEFINES.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-10-26 01:50:45 (GMT)
committerSteven Knight <knight@baldmt.com>2003-10-26 01:50:45 (GMT)
commit6878482a572e1fb93bdf6a3d933193fe668a6978 (patch)
tree7957d1b2adcfc517405fb75789573acec4d5f9e5 /test/CPPDEFINES.py
parentd1e65c3d358b857b1e53b90c0f4c940c7f95c6a5 (diff)
downloadSCons-6878482a572e1fb93bdf6a3d933193fe668a6978.zip
SCons-6878482a572e1fb93bdf6a3d933193fe668a6978.tar.gz
SCons-6878482a572e1fb93bdf6a3d933193fe668a6978.tar.bz2
Fix a regression with CPPDEFINES when using the g++ Tool.
Diffstat (limited to 'test/CPPDEFINES.py')
-rw-r--r--test/CPPDEFINES.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CPPDEFINES.py b/test/CPPDEFINES.py
index b8e08f8..50b6abd 100644
--- a/test/CPPDEFINES.py
+++ b/test/CPPDEFINES.py
@@ -78,10 +78,12 @@ test.run(arguments = '.', stdout=expect)
test.write('SConstruct', """\
foo = Environment(CPPDEFINES = ['FOO', ('VAL', 7)])
bar = Environment(CPPDEFINES = {'BAR':None, 'VAL':8})
+baz = Environment(CPPDEFINES = ['BAZ', ('VAL', 9)])
f = foo.Object(target = 'foo', source = 'prog.c')
b = bar.Object(target = 'bar', source = 'prog.c')
foo.Program(target = 'foo', source = f)
bar.Program(target = 'bar', source = b)
+baz.Program(target = 'baz', source = 'baz.cpp')
""")
test.write('prog.c', r"""
@@ -99,10 +101,24 @@ main(int argc, char *argv[])
}
""")
+test.write('baz.cpp', r"""\
+#include <stdio.h>
+#include <stdlib.h>
+int
+main(int argc, char *argv[])
+{
+#ifdef BAZ
+ printf("baz.cpp: BAZ %d\n", VAL);
+#endif
+ return(0);
+}
+""")
+
test.run(arguments = '.')
test.run(program = test.workpath('foo'), stdout = "prog.c: FOO 7\n")
test.run(program = test.workpath('bar'), stdout = "prog.c: BAR 8\n")
+test.run(program = test.workpath('baz'), stdout = "baz.cpp: BAZ 9\n")
test.pass_test()