diff options
Diffstat (limited to 'test/subdir.py')
-rw-r--r-- | test/subdir.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/subdir.py b/test/subdir.py index 2161195..318cf82 100644 --- a/test/subdir.py +++ b/test/subdir.py @@ -33,8 +33,8 @@ test.subdir('subdir') 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() """) @@ -48,17 +48,17 @@ env.B(target = 'subdir/f3.out', source = 'subdir/f3.in') env.B(target = 'subdir/f4.out', source = 'subdir/f4.in') """) -test.write('subdir/f1.in', "f1.in\n") -test.write('subdir/f2.in', "f2.in\n") -test.write('subdir/f3.in', "f3.in\n") -test.write('subdir/f4.in', "f4.in\n") +test.write(['subdir', 'f1.in'], "f1.in\n") +test.write(['subdir', 'f2.in'], "f2.in\n") +test.write(['subdir', 'f3.in'], "f3.in\n") +test.write(['subdir', 'f4.in'], "f4.in\n") test.run(arguments = 'subdir') -test.fail_test(test.read('subdir/f1.out') != "f1.in\n") -test.fail_test(test.read('subdir/f2.out') != "f2.in\n") -test.fail_test(test.read('subdir/f3.out') != "f3.in\n") -test.fail_test(test.read('subdir/f4.out') != "f4.in\n") +test.fail_test(test.read(['subdir', 'f1.out']) != "f1.in\n") +test.fail_test(test.read(['subdir', 'f2.out']) != "f2.in\n") +test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\n") +test.fail_test(test.read(['subdir', 'f4.out']) != "f4.in\n") test.up_to_date(arguments = 'subdir') |