diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-30 00:13:07 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-30 00:13:07 -0700 |
| commit | 902df103c6151c257c90de9ba5f29f7f4b9dbea2 (patch) | |
| tree | 16a522f3c8bbe34b56038d4810bf2487e32e2d85 /test/cli.zig | |
| parent | 173d56213b60fc570b6ba3922ee1d40bbf0d0e36 (diff) | |
| download | zig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.tar.gz zig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.zip | |
std lib API deprecations for the upcoming 0.9.0 release
See #3811
Diffstat (limited to 'test/cli.zig')
| -rw-r--r-- | test/cli.zig | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/cli.zig b/test/cli.zig index fb322f0f0e..837aef4229 100644 --- a/test/cli.zig +++ b/test/cli.zig @@ -19,11 +19,11 @@ pub fn main() !void { a = &arena.allocator; const zig_exe_rel = try (arg_it.next(a) orelse { - std.debug.warn("Expected first argument to be path to zig compiler\n", .{}); + std.debug.print("Expected first argument to be path to zig compiler\n", .{}); return error.InvalidArgs; }); const cache_root = try (arg_it.next(a) orelse { - std.debug.warn("Expected second argument to be cache root directory path\n", .{}); + std.debug.print("Expected second argument to be cache root directory path\n", .{}); return error.InvalidArgs; }); const zig_exe = try fs.path.resolve(a, &[_][]const u8{zig_exe_rel}); @@ -47,11 +47,11 @@ pub fn main() !void { } fn printCmd(cwd: []const u8, argv: []const []const u8) void { - std.debug.warn("cd {s} && ", .{cwd}); + std.debug.print("cd {s} && ", .{cwd}); for (argv) |arg| { - std.debug.warn("{s} ", .{arg}); + std.debug.print("{s} ", .{arg}); } - std.debug.warn("\n", .{}); + std.debug.print("\n", .{}); } fn exec(cwd: []const u8, expect_0: bool, argv: []const []const u8) !ChildProcess.ExecResult { @@ -62,23 +62,23 @@ fn exec(cwd: []const u8, expect_0: bool, argv: []const []const u8) !ChildProcess .cwd = cwd, .max_output_bytes = max_output_size, }) catch |err| { - std.debug.warn("The following command failed:\n", .{}); + std.debug.print("The following command failed:\n", .{}); printCmd(cwd, argv); return err; }; switch (result.term) { .Exited => |code| { if ((code != 0) == expect_0) { - std.debug.warn("The following command exited with error code {}:\n", .{code}); + std.debug.print("The following command exited with error code {}:\n", .{code}); printCmd(cwd, argv); - std.debug.warn("stderr:\n{s}\n", .{result.stderr}); + std.debug.print("stderr:\n{s}\n", .{result.stderr}); return error.CommandFailed; } }, else => { - std.debug.warn("The following command terminated unexpectedly:\n", .{}); + std.debug.print("The following command terminated unexpectedly:\n", .{}); printCmd(cwd, argv); - std.debug.warn("stderr:\n{s}\n", .{result.stderr}); + std.debug.print("stderr:\n{s}\n", .{result.stderr}); return error.CommandFailed; }, } |
