We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e4b3a8 commit 5f3a259Copy full SHA for 5f3a259
1 file changed
tools/tinytest-codegen.py
@@ -23,7 +23,7 @@ def chew_filename(t):
23
24
def script_to_map(test_file):
25
r = {"name": chew_filename(test_file)["func"]}
26
- with open(t) as test:
+ with open(test_file, "rb") as test:
27
script = test.readlines()
28
29
# Test for import skip_if and inject it into the test as needed.
@@ -39,7 +39,11 @@ def script_to_map(test_file):
39
continue
40
script.insert(index + total_lines, "\t" + line)
41
total_lines += 1
42
- r['script'] = escape(''.join(script))
+ r['script'] = escape(b''.join(script))
43
+
44
+ with open(test_file + ".exp", "rb") as f:
45
+ r["output"] = escape(f.read())
46
47
return r
48
49
test_function = (
0 commit comments