aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-10-17 21:46:41 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-10-17 21:55:49 -0400
commit2d5b2bf1c986d037ef965bf8c9b4d8dfd5967478 (patch)
treee7b0f9f6f509e34edeb2226569b2ae78d34cfb5a /test
parent299991019dddb2acd076d4b2698a4fd6a7a6ae94 (diff)
downloadzig-2d5b2bf1c986d037ef965bf8c9b4d8dfd5967478.tar.gz
zig-2d5b2bf1c986d037ef965bf8c9b4d8dfd5967478.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/cli.zig4
1 files changed, 2 insertions, 2 deletions
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,
});
}