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/option--.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/option--.py')
-rw-r--r-- | test/option--.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/option--.py b/test/option--.py index e9f427a..9fca2bd 100644 --- a/test/option--.py +++ b/test/option--.py @@ -24,29 +24,31 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import TestSCons import os.path import string import sys +import TestSCons + +python = sys.executable test = TestSCons.TestSCons() test.write('build.py', r""" import sys -file = open(sys.argv[1], 'w') +file = open(sys.argv[1], 'wb') file.write("build.py: %s\n" % sys.argv[1]) file.close() """) test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = "python build.py $targets") + action = r'%s build.py $targets') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = '-f1.out', source = 'f1.in') env.MyBuild(target = '-f2.out', source = 'f2.in') -""") +""" % python) -expect = "python build.py -f1.out\npython build.py -f2.out\n" +expect = "%s build.py -f1.out\n%s build.py -f2.out\n" % (python, python) test.run(arguments = '-- -f1.out -f2.out', stdout = expect) test.fail_test(not os.path.exists(test.workpath('-f1.out'))) |