diff options
author | Steven Knight <knight@baldmt.com> | 2004-10-09 03:23:36 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-10-09 03:23:36 (GMT) |
commit | a538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5 (patch) | |
tree | e0e0d0df134f2f47857e0a202e6ea95e78552889 /test/chdir.py | |
parent | 6f708d0ca8b7f61a1d7ba98a945e32b25417952d (diff) | |
download | SCons-a538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5.zip SCons-a538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5.tar.gz SCons-a538b7dded2a3d4ff54fdc9598bb8c9578c7d7d5.tar.bz2 |
Win32 portability fixes for tests.
Diffstat (limited to 'test/chdir.py')
-rw-r--r-- | test/chdir.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/chdir.py b/test/chdir.py index e2d0894..9a77d75 100644 --- a/test/chdir.py +++ b/test/chdir.py @@ -91,8 +91,9 @@ other9_f19_in = test.workpath('other9', 'f19.in') test.write(cat_py, """\ import sys -ofp = open(sys.argv[1], 'w') -for ifp in map(open, sys.argv[2:]): +ofp = open(sys.argv[1], 'wb') +for f in sys.argv[2:]: + ifp = open(f, 'rb') ofp.write(ifp.read()) ofp.close """) @@ -223,7 +224,7 @@ test.must_match(['work1', 'sub23', 'f23.out'], "work1/sub23/f23.in\n") test.subdir('work2', ['work2', 'sub']) -work2 = test.workpath('work2') +work2 = repr(test.workpath('work2')) work2_sub_f1_out = test.workpath('work2', 'sub', 'f1.out') work2_sub_f2_out = test.workpath('work2', 'sub', 'f2.out') @@ -246,11 +247,11 @@ test.write(['work2', 'sub', 'f2.in'], "work2/sub/f2.in") expect = test.wrap_stdout("""\ os.chdir('sub') %(python)s %(cat_py)s f1.out f1.in -os.chdir('%(work2)s') +os.chdir(%(work2)s) os.chdir('sub') %(python)s %(cat_py)s .temp f2.in %(python)s %(cat_py)s f2.out .temp -os.chdir('%(work2)s') +os.chdir(%(work2)s) """ % locals()) test.run(chdir='work2', arguments='-n .', stdout=expect) |