From 2d5b2bf1c986d037ef965bf8c9b4d8dfd5967478 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 17 Oct 2019 21:46:41 -0400 Subject: improve progress reporting * use erase rest of line escape code. * use `stderr.supportsAnsiEscapeCodes` rather than `isTty`. * respect `--color off` * avoid unnecessary recursion * add `Progress.log` * disable the progress std lib test since it's noisy and uses `time.sleep()`. * enable/integrate progress printing with the default test runner --- test/cli.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cli.zig') diff --git a/test/cli.zig b/test/cli.zig index 8287c41b81..63a116a811 100644 --- a/test/cli.zig +++ b/test/cli.zig @@ -87,7 +87,7 @@ fn exec(cwd: []const u8, argv: []const []const u8) !ChildProcess.ExecResult { fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void { _ = try exec(dir_path, [_][]const u8{ zig_exe, "init-lib" }); const test_result = try exec(dir_path, [_][]const u8{ zig_exe, "build", "test" }); - testing.expect(std.mem.endsWith(u8, test_result.stderr, "All tests passed.\n")); + testing.expect(std.mem.eql(u8, test_result.stderr, "")); } fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void { @@ -136,6 +136,6 @@ fn testMissingOutputPath(zig_exe: []const u8, dir_path: []const u8) !void { const output_path = try fs.path.join(a, [_][]const u8{ "does", "not", "exist" }); const source_path = try fs.path.join(a, [_][]const u8{ "src", "main.zig" }); _ = try exec(dir_path, [_][]const u8{ - zig_exe, "build-exe", source_path, "--output-dir", output_path + zig_exe, "build-exe", source_path, "--output-dir", output_path, }); } -- cgit v1.2.3