Commit 65165554d0

Andrew Kelley <andrew@ziglang.org>
2019-10-22 02:49:35
test runner: restore previous behavior when...
...stderr does not support ansi escape codes
1 parent 9a82f00
Changed files (1)
lib
std
lib/std/special/test_runner.zig
@@ -15,14 +15,17 @@ pub fn main() anyerror!void {
     for (test_fn_list) |test_fn, i| {
         var test_node = root_node.start(test_fn.name, null);
         test_node.activate();
+        if (progress.terminal == null) std.debug.warn("{}/{} {}...", i + 1, test_fn_list.len, test_fn.name);
         if (test_fn.func()) |_| {
             ok_count += 1;
             test_node.end();
+            if (progress.terminal == null) std.debug.warn("OK\n");
         } else |err| switch (err) {
             error.SkipZigTest => {
                 skip_count += 1;
                 test_node.end();
                 progress.log("{}...SKIP\n", test_fn.name);
+                if (progress.terminal == null) std.debug.warn("SKIP\n");
             },
             else => return err,
         }
@@ -30,5 +33,6 @@ 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);
     }
 }