summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-14 17:23:03 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-14 17:23:03 (GMT)
commita1f595e9dd4fefbcb3240c572cf39f29c3a39ae6 (patch)
treee0deb67121a38a5921c76babbf4245d6f26533a0 /test
parent13873a35cc5bbfba162414d6a63c790632192729 (diff)
downloadSCons-a1f595e9dd4fefbcb3240c572cf39f29c3a39ae6.zip
SCons-a1f595e9dd4fefbcb3240c572cf39f29c3a39ae6.tar.gz
SCons-a1f595e9dd4fefbcb3240c572cf39f29c3a39ae6.tar.bz2
fix py2/3 win32
Diffstat (limited to 'test')
-rw-r--r--test/srcchange.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/srcchange.py b/test/srcchange.py
index 8021827..bef3589 100644
--- a/test/srcchange.py
+++ b/test/srcchange.py
@@ -45,7 +45,7 @@ test = TestSCons.TestSCons()
test.write('getrevision', """
#!/usr/bin/env python
from __future__ import print_function
-print(open('revnum.in','r').read().strip())
+print(open('revnum.in','r').read().strip(), end='')
""")
test.write('SConstruct', """
@@ -72,17 +72,18 @@ exe = env.Program('main.c')
env.Default(exe)
""" % locals())
-test.write('main.c', """\
+test.write('main.c', r"""\
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
- printf("Revision $REV$\\n");
+ printf("Revision $REV$\n");
exit (0);
}
-""", mode='w')
+
+""")
test.write('revnum.in', '3.2\n')
@@ -94,7 +95,7 @@ light_build = test.wrap_stdout("""\
test.run(arguments='.')
test.must_exist(program_name)
-test.run(program_name=test.workpath(program_name), stdout='Revision $REV: 3.2$\n')
+test.run(program=test.workpath(program_name), stdout='Revision $REV: 3.2$\n')
test.run(arguments='.', stdout=light_build)
test.must_exist(program_name)
@@ -106,7 +107,7 @@ test.write('revnum.in', '3.3\n')
test.run(arguments='.')
test.must_exist(program_name)
-test.run(program_name=test.workpath(program_name), stdout='Revision $REV: 3.3$\n')
+test.run(program=test.workpath(program_name), stdout='Revision $REV: 3.3$\n')
test.pass_test()