summaryrefslogtreecommitdiff
path: root/test/Program-j.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-11-29 06:29:22 +0000
committerSteven Knight <knight@baldmt.com>2001-11-29 06:29:22 +0000
commit94888b28d673f05360670ad3eeac836b5260e44a (patch)
tree3bffd52edc3e68463a13c59d24b975ed63a19641 /test/Program-j.py
parentb88f3951d7ec14f464438d4bd6af6ee95b872888 (diff)
downloadscons-94888b28d673f05360670ad3eeac836b5260e44a.tar.gz
More NT portability in the tests.
Diffstat (limited to 'test/Program-j.py')
-rw-r--r--test/Program-j.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/test/Program-j.py b/test/Program-j.py
index 6b86127a..231fff82 100644
--- a/test/Program-j.py
+++ b/test/Program-j.py
@@ -24,8 +24,19 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import sys
import TestSCons
+if sys.platform == 'win32':
+ _exe = '.exe'
+else:
+ _exe = ''
+
+f1 = 'f1' + _exe
+f2 = 'f2' + _exe
+f3 = 'f3' + _exe
+f4 = 'f4' + _exe
+
test = TestSCons.TestSCons()
test.write('SConstruct', """
@@ -36,49 +47,49 @@ env.Program(target = 'f3', source = 'f3.c')
env.Program(target = 'f4', source = 'f4.c')
""")
-test.write('f1.c', """
+test.write('f1.c', r"""
int
main(int argc, char *argv[])
{
argv[argc++] = "--";
- printf(\"f1.c\n\");
+ printf("f1.c\n");
exit (0);
}
""")
-test.write('f2.c', """
+test.write('f2.c', r"""
int
main(int argc, char *argv[])
{
argv[argc++] = "--";
- printf(\"f2.c\n\");
+ printf("f2.c\n");
exit (0);
}
""")
-test.write('f3.c', """
+test.write('f3.c', r"""
int
main(int argc, char *argv[])
{
argv[argc++] = "--";
- printf(\"f3.c\n\");
+ printf("f3.c\n");
exit (0);
}
""")
-test.write('f4.c', """
+test.write('f4.c', r"""
int
main(int argc, char *argv[])
{
argv[argc++] = "--";
- printf(\"f4.c\n\");
+ printf("f4.c\n");
exit (0);
}
""")
-test.run(arguments = '-j 3 f1 f2 f3 f4')
+test.run(arguments = '-j 3 %s %s %s %s' % (f1, f2, f3, f4))
test.run(program = test.workpath('f1'), stdout = "f1.c\n")