Commit 064377be9a

Andrew Kelley <andrew@ziglang.org>
2019-10-22 04:20:45
test runner: restore previous behavior of printing all tests passed
1 parent fc6f84f
Changed files (2)
lib
std
test
lib/std/special/test_runner.zig
@@ -31,8 +31,9 @@ pub fn main() anyerror!void {
         }
     }
     root_node.end();
-    if (ok_count != test_fn_list.len) {
-        progress.log("{} passed; {} skipped.\n", ok_count, skip_count);
-        if (progress.terminal == null) std.debug.warn("{} passed; {} skipped.\n", ok_count, skip_count);
+    if (ok_count == test_fn_list.len) {
+        std.debug.warn("All tests passed.\n");
+    } else {
+        std.debug.warn("{} passed; {} skipped.\n", ok_count, skip_count);
     }
 }
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.eql(u8, test_result.stderr, ""));
+    testing.expect(std.mem.endsWith(u8, test_result.stderr, "All tests passed.\n"));
 }
 
 fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void {