`zig test` -> OK printing is missing on MacOS Terminal

Welcome @MickeyOh,

You are getting this result because you are using a tty.

zig test test.zig
All 1 tests passed.

If you capture both stdout and stderr it displays:

zig test test.zig 2>&1 | head
1/1 test.print test result... OK
All 1 tests passed.

A way to overcome this is to build your own test_runner and use the --test-runner option. The default test_runner is bundled at lib/test_runner.zig

See also this thread:

2 Likes