summaryrefslogtreecommitdiff
path: root/test/M4
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-09-22 17:19:50 -0400
committerWilliam Blevins <wblevins001@gmail.com>2016-09-22 17:19:50 -0400
commitc656843961d92cf79f14a2298054d255de67afab (patch)
treeda169366f448026e53f19b21c854a9c53be79644 /test/M4
parent2d15eeac923a7f8e2d2d1c7e1feb0f7eac95a9e7 (diff)
downloadscons-c656843961d92cf79f14a2298054d255de67afab.tar.gz
Yet another batch of test fixes.
Diffstat (limited to 'test/M4')
-rw-r--r--test/M4/M4.py10
-rw-r--r--test/M4/M4COM.py2
-rw-r--r--test/M4/M4COMSTR.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/test/M4/M4.py b/test/M4/M4.py
index 6c2de9cc..d2b83659 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 ad151729..5a2f076a 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 1b5bd353..da01e6cc 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)
""")