summaryrefslogtreecommitdiffstats
path: root/test/LEX
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-09-22 21:19:50 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-09-22 21:19:50 (GMT)
commit0f0725d9215ca35e9b9995a9421ef83e35a338d8 (patch)
treeda169366f448026e53f19b21c854a9c53be79644 /test/LEX
parentefb7469bf68d57b590fa477f0ea2224d339f679f (diff)
downloadSCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.zip
SCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.tar.gz
SCons-0f0725d9215ca35e9b9995a9421ef83e35a338d8.tar.bz2
Yet another batch of test fixes.
Diffstat (limited to 'test/LEX')
-rw-r--r--test/LEX/LEX.py2
-rw-r--r--test/LEX/LEXCOM.py2
-rw-r--r--test/LEX/LEXCOMSTR.py2
-rw-r--r--test/LEX/LEXFLAGS.py6
-rw-r--r--test/LEX/live.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/test/LEX/LEX.py b/test/LEX/LEX.py
index 975d4e9..1239c6b 100644
--- a/test/LEX/LEX.py
+++ b/test/LEX/LEX.py
@@ -41,7 +41,7 @@ import sys
cmd_opts, args = getopt.getopt(sys.argv[1:], 't', [])
for a in args:
contents = open(a, 'rb').read()
- sys.stdout.write(contents.replace('LEX', 'mylex.py'))
+ sys.stdout.write(contents.replace(b'LEX', b'mylex.py').decode())
sys.exit(0)
""")
diff --git a/test/LEX/LEXCOM.py b/test/LEX/LEXCOM.py
index 5fb82fe..6a32388 100644
--- a/test/LEX/LEXCOM.py
+++ b/test/LEX/LEXCOM.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 != '/*lex*/\\n']:
+ for l in [l for l in infile.readlines() if l != b'/*lex*/\\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LEX/LEXCOMSTR.py b/test/LEX/LEXCOMSTR.py
index 83b2f9c..07e693c 100644
--- a/test/LEX/LEXCOMSTR.py
+++ b/test/LEX/LEXCOMSTR.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 != '/*lex*/\\n']:
+ for l in [l for l in infile.readlines() if l != b'/*lex*/\\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/LEX/LEXFLAGS.py b/test/LEX/LEXFLAGS.py
index 82ae586..54df161 100644
--- a/test/LEX/LEXFLAGS.py
+++ b/test/LEX/LEXFLAGS.py
@@ -48,9 +48,9 @@ for opt, arg in cmd_opts:
else: opt_string = opt_string + ' ' + opt
for a in args:
contents = open(a, 'rb').read()
- contents = contents.replace('LEXFLAGS', opt_string)
- contents = contents.replace('I_ARGS', i_arguments)
- sys.stdout.write(contents)
+ contents = contents.replace(b'LEXFLAGS', opt_string.encode())
+ contents = contents.replace(b'I_ARGS', i_arguments.encode())
+ sys.stdout.write(contents.decode())
sys.exit(0)
""")
diff --git a/test/LEX/live.py b/test/LEX/live.py
index e4b4dfb..2abb8ce 100644
--- a/test/LEX/live.py
+++ b/test/LEX/live.py
@@ -44,7 +44,7 @@ if not lex:
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('\\', '\\\\'))