hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit c2e157ea1010feccbcd145a9bb6049206978074a
parent b2e4e4d3ef9e95a98ac7bc996933697291c373ce
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat, 20 Apr 2024 22:12:24 -0400

test: color skipped tests gray

Makes the output easier to digest when tests fail, so you can tell where
the skipped tests end and the failed tests begin.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mtest/+test.ha | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/+test.ha b/test/+test.ha @@ -128,11 +128,14 @@ export @symbol("__test_main") fn main() size = { }; fmt::println()!; + if (len(ctx.skipped) > 0 && colored()) { + fmt::print("\x1b[37m")!; + }; for (let skipped .. ctx.skipped) { fmt::printfln("Skipped {}: {}", skipped.test, skipped.reason)!; }; if (len(ctx.skipped) > 0) { - fmt::println()!; + fmt::println(if (colored()) "\x1b[m" else "")!; }; if (len(ctx.failures) > 0) {