diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-17 16:42:21 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-17 16:42:21 (GMT) |
commit | 772ede31d7a5aed0c72943be9230313de687e0be (patch) | |
tree | f017114c2e9f7c7b8530f6216401a07b398d4b5f /test/multiline.py | |
parent | 3b884c9421bae33e2c7a204aacc5fdc2d9394423 (diff) | |
download | SCons-772ede31d7a5aed0c72943be9230313de687e0be.zip SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.gz SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.bz2 |
Portability fixes for tests on Windows Nt.
Diffstat (limited to 'test/multiline.py')
-rw-r--r-- | test/multiline.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/multiline.py b/test/multiline.py index dca0b00..7560d55 100644 --- a/test/multiline.py +++ b/test/multiline.py @@ -25,28 +25,31 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os.path +import sys import TestSCons +python = sys.executable + test = TestSCons.TestSCons() test.write('build.py', r""" import sys -contents = open(sys.argv[2], 'r').read() -file = open(sys.argv[1], 'w') +contents = open(sys.argv[2], 'rb').read() +file = open(sys.argv[1], 'wb') file.write(contents) file.close() sys.exit(0) """) test.write('SConstruct', """ -B1 = Builder(name = 'B1', action = ["python build.py .temp $sources", - "python build.py $targets .temp"]) -B2 = Builder(name = 'B2', action = "python build.py .temp $sources\\npython build.py $targets .temp") +B1 = Builder(name = 'B1', action = [r'%s build.py .temp $sources', + r'%s build.py $targets .temp']) +B2 = Builder(name = 'B2', action = r'%s' + " build.py .temp $sources\\n" + r'%s' + " build.py $targets .temp") env = Environment(BUILDERS = [B1, B2]) env.B1(target = 'foo1.out', source = 'foo1.in') env.B2(target = 'foo2.out', source = 'foo2.in') env.B1(target = 'foo3.out', source = 'foo3.in') -""") +""" % (python, python, python, python)) test.write('foo1.in', "foo1.in\n") |