summaryrefslogtreecommitdiffstats
path: root/test/CPPPATH.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-11-29 06:29:22 (GMT)
committerSteven Knight <knight@baldmt.com>2001-11-29 06:29:22 (GMT)
commit94888b28d673f05360670ad3eeac836b5260e44a (patch)
tree3bffd52edc3e68463a13c59d24b975ed63a19641 /test/CPPPATH.py
parentb88f3951d7ec14f464438d4bd6af6ee95b872888 (diff)
downloadSCons-94888b28d673f05360670ad3eeac836b5260e44a.zip
SCons-94888b28d673f05360670ad3eeac836b5260e44a.tar.gz
SCons-94888b28d673f05360670ad3eeac836b5260e44a.tar.bz2
More NT portability in the tests.
Diffstat (limited to 'test/CPPPATH.py')
-rw-r--r--test/CPPPATH.py34
1 files changed, 21 insertions, 13 deletions
diff --git a/test/CPPPATH.py b/test/CPPPATH.py
index 345603b..30b0c22 100644
--- a/test/CPPPATH.py
+++ b/test/CPPPATH.py
@@ -24,8 +24,16 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import sys
import TestSCons
+if sys.platform == 'win32':
+ _exe = '.exe'
+else:
+ _exe = ''
+
+prog = 'prog' + _exe
+
test = TestSCons.TestSCons()
test.write('foo.c',
@@ -43,13 +51,13 @@ int main(void)
test.subdir('include')
test.write('include/foo.h',
-"""
+r"""
#define FOO_STRING "foo.h 1\n"
#include "bar.h"
""")
test.write('include/bar.h',
-"""
+r"""
#define BAR_STRING "bar.h 1\n"
""")
@@ -58,38 +66,38 @@ env = Environment(CPPPATH = ['include'])
env.Program(target='prog', source='foo.c')
""")
-test.run(arguments = 'prog')
+test.run(arguments = prog)
-test.run(program = test.workpath('prog'),
+test.run(program = test.workpath(prog),
stdout = "foo.h 1\nbar.h 1\n")
-test.up_to_date(arguments = 'prog')
+test.up_to_date(arguments = prog)
test.unlink('include/foo.h')
test.write('include/foo.h',
-"""
+r"""
#define FOO_STRING "foo.h 2\n"
#include "bar.h"
""")
-test.run(arguments = 'prog')
+test.run(arguments = prog)
-test.run(program = test.workpath('prog'),
+test.run(program = test.workpath(prog),
stdout = "foo.h 2\nbar.h 1\n")
-test.up_to_date(arguments = 'prog')
+test.up_to_date(arguments = prog)
test.unlink('include/bar.h')
test.write('include/bar.h',
-"""
+r"""
#define BAR_STRING "bar.h 2\n"
""")
-test.run(arguments = 'prog')
+test.run(arguments = prog)
-test.run(program = test.workpath('prog'),
+test.run(program = test.workpath(prog),
stdout = "foo.h 2\nbar.h 2\n")
-test.up_to_date(arguments = 'prog')
+test.up_to_date(arguments = prog)
test.pass_test()