diff options
Diffstat (limited to 'test/AS')
-rw-r--r-- | test/AS/AS.py | 8 | ||||
-rw-r--r-- | test/AS/ASCOM.py | 18 | ||||
-rw-r--r-- | test/AS/ASCOMSTR.py | 10 | ||||
-rw-r--r-- | test/AS/ASPPCOM.py | 10 | ||||
-rw-r--r-- | test/AS/ASPPCOMSTR.py | 6 | ||||
-rw-r--r-- | test/AS/as-live.py | 2 | ||||
-rw-r--r-- | test/AS/ml.py | 2 |
7 files changed, 28 insertions, 28 deletions
diff --git a/test/AS/AS.py b/test/AS/AS.py index e0ffbf4..6ccf0cb 100644 --- a/test/AS/AS.py +++ b/test/AS/AS.py @@ -58,7 +58,7 @@ while args: infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): - if l[:5] != '#link': + if l[:5] != b'#link': outfile.write(l) sys.exit(0) """) @@ -82,7 +82,7 @@ while args: infile = open(inf, 'rb') outfile = open(out, 'wb') for l in infile.readlines(): - if l[:3] != '#as': + if l[:3] != b'#as': outfile.write(l) sys.exit(0) """) @@ -98,7 +98,7 @@ for opt, arg in opts: infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): - if l[:5] != '#link': + if l[:5] != b'#link': outfile.write(l) sys.exit(0) """) @@ -112,7 +112,7 @@ for opt, arg in opts: infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): - if l[:3] != '#as': + if l[:3] != b'#as': outfile.write(l) sys.exit(0) """) diff --git a/test/AS/ASCOM.py b/test/AS/ASCOM.py index 568bd00..8f91404 100644 --- a/test/AS/ASCOM.py +++ b/test/AS/ASCOM.py @@ -42,7 +42,7 @@ test.write('myas.py', r""" import sys infile = open(sys.argv[2], 'rb') outfile = open(sys.argv[1], 'wb') -for l in [l for l in infile.readlines() if l != "#as\n"]: +for l in [l for l in infile.readlines() if l != b"#as\n"]: outfile.write(l) sys.exit(0) """) @@ -80,14 +80,14 @@ test.write('test8'+alt_asm_suffix, "test8.ASM\n#as\n") test.run(arguments = '.') -test.fail_test(test.read('test1.obj') != "test1.s\n") -test.fail_test(test.read('test2.obj') != "test2.S\n") -test.fail_test(test.read('test3.obj') != "test3.asm\n") -test.fail_test(test.read('test4.obj') != "test4.ASM\n") -test.fail_test(test.read('test5.shobj') != "test5.s\n") -test.fail_test(test.read('test6.shobj') != "test6.S\n") -test.fail_test(test.read('test7.shobj') != "test7.asm\n") -test.fail_test(test.read('test8.shobj') != "test8.ASM\n") +test.must_match('test1.obj', "test1.s\n") +test.must_match('test2.obj', "test2.S\n") +test.must_match('test3.obj', "test3.asm\n") +test.must_match('test4.obj', "test4.ASM\n") +test.must_match('test5.shobj', "test5.s\n") +test.must_match('test6.shobj', "test6.S\n") +test.must_match('test7.shobj', "test7.asm\n") +test.must_match('test8.shobj', "test8.ASM\n") diff --git a/test/AS/ASCOMSTR.py b/test/AS/ASCOMSTR.py index f7cc34e..39b963f 100644 --- a/test/AS/ASCOMSTR.py +++ b/test/AS/ASCOMSTR.py @@ -43,7 +43,7 @@ test.write('myas.py', r""" import sys infile = open(sys.argv[2], 'rb') outfile = open(sys.argv[1], 'wb') -for l in [l for l in infile.readlines() if l != "#as\n"]: +for l in [l for l in infile.readlines() if l != b"#as\n"]: outfile.write(l) sys.exit(0) """) @@ -77,10 +77,10 @@ Assembling test3.obj from test3.asm Assembling test4.obj from test4%(alt_asm_suffix)s """ % locals())) -test.fail_test(test.read('test1.obj') != "test1.s\n") -test.fail_test(test.read('test2.obj') != "test2.S\n") -test.fail_test(test.read('test3.obj') != "test3.asm\n") -test.fail_test(test.read('test4.obj') != "test4.ASM\n") +test.must_match('test1.obj', "test1.s\n") +test.must_match('test2.obj', "test2.S\n") +test.must_match('test3.obj', "test3.asm\n") +test.must_match('test4.obj', "test4.ASM\n") diff --git a/test/AS/ASPPCOM.py b/test/AS/ASPPCOM.py index f89306e..62f859a 100644 --- a/test/AS/ASPPCOM.py +++ b/test/AS/ASPPCOM.py @@ -40,7 +40,7 @@ test.write('myas.py', r""" import sys infile = open(sys.argv[2], 'rb') outfile = open(sys.argv[1], 'wb') -for l in [l for l in infile.readlines() if l != "#as\n"]: +for l in [l for l in infile.readlines() if l != b"#as\n"]: outfile.write(l) sys.exit(0) """) @@ -63,10 +63,10 @@ test.write('test4.SPP', "test4.SPP\n#as\n") test.run(arguments = '.') -test.fail_test(test.read('test1.obj') != "test1.spp\n") -test.fail_test(test.read('test2.obj') != "test2.SPP\n") -test.fail_test(test.read('test3.shobj') != "test3.spp\n") -test.fail_test(test.read('test4.shobj') != "test4.SPP\n") +test.must_match('test1.obj', "test1.spp\n") +test.must_match('test2.obj', "test2.SPP\n") +test.must_match('test3.shobj', "test3.spp\n") +test.must_match('test4.shobj', "test4.SPP\n") diff --git a/test/AS/ASPPCOMSTR.py b/test/AS/ASPPCOMSTR.py index 7de3b12..0497470 100644 --- a/test/AS/ASPPCOMSTR.py +++ b/test/AS/ASPPCOMSTR.py @@ -41,7 +41,7 @@ test.write('myas.py', r""" import sys infile = open(sys.argv[2], 'rb') outfile = open(sys.argv[1], 'wb') -for l in [l for l in infile.readlines() if l != "#as\n"]: +for l in [l for l in infile.readlines() if l != b"#as\n"]: outfile.write(l) sys.exit(0) """) @@ -62,8 +62,8 @@ Assembling test1.obj from test1.spp Assembling test2.obj from test2.SPP """)) -test.fail_test(test.read('test1.obj') != "test1.spp\n") -test.fail_test(test.read('test2.obj') != "test2.SPP\n") +test.must_match('test1.obj', "test1.spp\n") +test.must_match('test2.obj', "test2.SPP\n") diff --git a/test/AS/as-live.py b/test/AS/as-live.py index 801eeca..879e7b2 100644 --- a/test/AS/as-live.py +++ b/test/AS/as-live.py @@ -58,7 +58,7 @@ if sys.platform == "win32": test.write("wrapper.py", """\ import os import sys -open('%s', 'wb').write("wrapper.py: %%s\\n" %% sys.argv[-1]) +open('%s', 'wb').write(("wrapper.py: %%s\\n" %% sys.argv[-1]).encode()) cmd = " ".join(sys.argv[1:]) os.system(cmd) """ % test.workpath('wrapper.out').replace('\\', '\\\\')) diff --git a/test/AS/ml.py b/test/AS/ml.py index 9491e36..c377172 100644 --- a/test/AS/ml.py +++ b/test/AS/ml.py @@ -48,7 +48,7 @@ if not ml: 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('\\', '\\\\')) |