aboutsummaryrefslogtreecommitdiff
path: root/test/tests.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-10 20:22:30 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-03-10 20:22:30 -0400
commit2bff0dda795cd84e4da59652736b7cfa7e1c964c (patch)
tree4b3bc5f10fefd1c3e4fedccc872ed99d9d87a6e7 /test/tests.zig
parent9abee660dce3b43b9ac3b8260fbf269532d6c7f5 (diff)
downloadzig-2bff0dda795cd84e4da59652736b7cfa7e1c964c.tar.gz
zig-2bff0dda795cd84e4da59652736b7cfa7e1c964c.zip
fix regressions found by test suite
Diffstat (limited to 'test/tests.zig')
-rw-r--r--test/tests.zig14
1 files changed, 4 insertions, 10 deletions
diff --git a/test/tests.zig b/test/tests.zig
index e324902579..22dad10e3e 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -566,12 +566,9 @@ pub const StackTracesContext = struct {
}
child.spawn() catch |err| debug.panic("Unable to spawn {}: {}\n", .{ full_exe_path, @errorName(err) });
- var stdout_file_in_stream = child.stdout.?.inStream();
- var stderr_file_in_stream = child.stderr.?.inStream();
-
- const stdout = stdout_file_in_stream.stream.readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
+ const stdout = child.stdout.?.inStream().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
defer b.allocator.free(stdout);
- const stderr = stderr_file_in_stream.stream.readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
+ const stderr = child.stderr.?.inStream().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
defer b.allocator.free(stderr);
const term = child.wait() catch |err| {
@@ -798,11 +795,8 @@ pub const CompileErrorContext = struct {
var stdout_buf = Buffer.initNull(b.allocator);
var stderr_buf = Buffer.initNull(b.allocator);
- var stdout_file_in_stream = child.stdout.?.inStream();
- var stderr_file_in_stream = child.stderr.?.inStream();
-
- stdout_file_in_stream.stream.readAllBuffer(&stdout_buf, max_stdout_size) catch unreachable;
- stderr_file_in_stream.stream.readAllBuffer(&stderr_buf, max_stdout_size) catch unreachable;
+ child.stdout.?.inStream().readAllBuffer(&stdout_buf, max_stdout_size) catch unreachable;
+ child.stderr.?.inStream().readAllBuffer(&stderr_buf, max_stdout_size) catch unreachable;
const term = child.wait() catch |err| {
debug.panic("Unable to spawn {}: {}\n", .{ zig_args.items[0], @errorName(err) });