summaryrefslogtreecommitdiffstats
path: root/test/CPPPATH.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-11-20 17:58:56 (GMT)
committerSteven Knight <knight@baldmt.com>2001-11-20 17:58:56 (GMT)
commitfa11b8d2fa2e3adc18588992ff869b1f1457c03f (patch)
tree569699b30c9de0106b55352d89b2d03ef8cfe086 /test/CPPPATH.py
parent76166c77f852377b6139a9414cc355fe2661a0e7 (diff)
downloadSCons-fa11b8d2fa2e3adc18588992ff869b1f1457c03f.zip
SCons-fa11b8d2fa2e3adc18588992ff869b1f1457c03f.tar.gz
SCons-fa11b8d2fa2e3adc18588992ff869b1f1457c03f.tar.bz2
Crain: Finish LIBS, LIBPATH, CPPPATH
Diffstat (limited to 'test/CPPPATH.py')
-rw-r--r--test/CPPPATH.py37
1 files changed, 35 insertions, 2 deletions
diff --git a/test/CPPPATH.py b/test/CPPPATH.py
index dec523d..32c00b6 100644
--- a/test/CPPPATH.py
+++ b/test/CPPPATH.py
@@ -28,11 +28,44 @@ import TestSCons
test = TestSCons.TestSCons()
-test.pass_test() #XXX Short-circuit until this is implemented.
+test.write('foo.c',
+"""#include "include/foo.h"
+#include <stdio.h>
+
+int main(void)
+{
+ printf(TEST_STRING);
+ return 0;
+}
+""")
+
+test.subdir('include')
+
+test.write('include/foo.h',
+"""
+#define TEST_STRING "Bad news\n"
+""")
test.write('SConstruct', """
+env = Environment()
+env.Program(target='prog', source='foo.c')
+#env.Depends(target='foo.c', dependency='include/foo.h')
""")
-test.run(arguments = '.')
+test.run(arguments = 'prog')
+
+test.run(program = test.workpath('prog'),
+ stdout = "Bad news\n")
+
+test.unlink('include/foo.h')
+test.write('include/foo.h',
+"""
+#define TEST_STRING "Good news\n"
+""")
+
+test.run(arguments = 'prog')
+
+test.run(program = test.workpath('prog'),
+ stdout = "Good news\n")
test.pass_test()