aboutsummaryrefslogtreecommitdiff
path: root/test/tests.zig
diff options
context:
space:
mode:
authorJay Petacat <jay@jayschwa.net>2021-01-05 20:57:18 -0500
committerAndrew Kelley <andrew@ziglang.org>2021-01-07 23:48:58 -0800
commita9b505fa7774e2e8451bedfa7bea27d7227572e7 (patch)
tree408a88da61e15d5ace79ecefebfe868c09f80d35 /test/tests.zig
parent8e9a1ac364360b160438af0b96132d5aacf39a71 (diff)
downloadzig-a9b505fa7774e2e8451bedfa7bea27d7227572e7.tar.gz
zig-a9b505fa7774e2e8451bedfa7bea27d7227572e7.zip
Reduce use of deprecated IO types
Related: #4917
Diffstat (limited to 'test/tests.zig')
-rw-r--r--test/tests.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tests.zig b/test/tests.zig
index 5ee381e5c2..ec6d9e1df8 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -652,9 +652,9 @@ pub const StackTracesContext = struct {
}
child.spawn() catch |err| debug.panic("Unable to spawn {s}: {s}\n", .{ full_exe_path, @errorName(err) });
- const stdout = child.stdout.?.inStream().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
+ const stdout = child.stdout.?.reader().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
defer b.allocator.free(stdout);
- const stderrFull = child.stderr.?.inStream().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
+ const stderrFull = child.stderr.?.reader().readAllAlloc(b.allocator, max_stdout_size) catch unreachable;
defer b.allocator.free(stderrFull);
var stderr = stderrFull;
@@ -875,8 +875,8 @@ pub const CompileErrorContext = struct {
var stdout_buf = ArrayList(u8).init(b.allocator);
var stderr_buf = ArrayList(u8).init(b.allocator);
- child.stdout.?.inStream().readAllArrayList(&stdout_buf, max_stdout_size) catch unreachable;
- child.stderr.?.inStream().readAllArrayList(&stderr_buf, max_stdout_size) catch unreachable;
+ child.stdout.?.reader().readAllArrayList(&stdout_buf, max_stdout_size) catch unreachable;
+ child.stderr.?.reader().readAllArrayList(&stderr_buf, max_stdout_size) catch unreachable;
const term = child.wait() catch |err| {
debug.panic("Unable to spawn {s}: {s}\n", .{ zig_args.items[0], @errorName(err) });