diff options
author | William Blevins <wblevins001@gmail.com> | 2016-09-22 21:19:50 (GMT) |
---|---|---|
committer | William Blevins <wblevins001@gmail.com> | 2016-09-22 21:19:50 (GMT) |
commit | 0f0725d9215ca35e9b9995a9421ef83e35a338d8 (patch) | |
tree | da169366f448026e53f19b21c854a9c53be79644 /test/M4 | |
parent | efb7469bf68d57b590fa477f0ea2224d339f679f (diff) | |
download | SCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.zip SCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.tar.gz SCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.tar.bz2 |
Yet another batch of test fixes.
Diffstat (limited to 'test/M4')
-rw-r--r-- | test/M4/M4.py | 10 | ||||
-rw-r--r-- | test/M4/M4COM.py | 2 | ||||
-rw-r--r-- | test/M4/M4COMSTR.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/M4/M4.py b/test/M4/M4.py index 6c2de9c..d2b8365 100644 --- a/test/M4/M4.py +++ b/test/M4/M4.py @@ -59,7 +59,7 @@ line 3 test.run() -test.fail_test(test.read(test.workpath('aaa.x'), 'r') != "line 1\nmym4.py\nline 3\n") +test.must_match(test.workpath('aaa.x'), "line 1\nmym4.py\nline 3\n") @@ -70,7 +70,7 @@ if m4: test.write("wrapper.py", """import os import sys -open('%s', 'wb').write("wrapper.py\\n") +open('%s', 'wb').write(b"wrapper.py\\n") os.system(" ".join(sys.argv[1:])) """ % test.workpath('wrapper.out').replace('\\', '\\\\')) @@ -96,11 +96,11 @@ bar.M4(target = 'bar', source = 'bar.m4') test.up_to_date(arguments = '.') - test.fail_test(test.read('wrapper.out') != "wrapper.py\n") + test.must_match('wrapper.out', "wrapper.py\n") - test.fail_test(test.read('foo.x', 'r') != "line 1\nfff\nline 3\n") + test.must_match('foo.x', "line 1\nfff\nline 3\n") - test.fail_test(test.read('bar', 'r') != "line 1\nbbb\nline 3\n") + test.must_match('bar', "line 1\nbbb\nline 3\n") test.pass_test() diff --git a/test/M4/M4COM.py b/test/M4/M4COM.py index ad15172..5a2f076 100644 --- a/test/M4/M4COM.py +++ b/test/M4/M4COM.py @@ -41,7 +41,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in [l for l in infile.readlines() if l != '/*m4*/\\n']: + for l in [l for l in infile.readlines() if l != b'/*m4*/\\n']: outfile.write(l) sys.exit(0) """) diff --git a/test/M4/M4COMSTR.py b/test/M4/M4COMSTR.py index 1b5bd35..da01e6c 100644 --- a/test/M4/M4COMSTR.py +++ b/test/M4/M4COMSTR.py @@ -42,7 +42,7 @@ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = open(f, 'rb') - for l in [l for l in infile.readlines() if l != '/*m4*/\\n']: + for l in [l for l in infile.readlines() if l != b'/*m4*/\\n']: outfile.write(l) sys.exit(0) """) |