Skip to content

Commit a993cd8

Browse files
authored
Print results of runtests with printstyled (#55780)
This ensures escape characters are used only if `stdout` can accept them.
1 parent 4633607 commit a993cd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ cd(@__DIR__) do
438438
# o_ts.verbose = true # set to true to show all timings when successful
439439
Test.print_test_results(o_ts, 1)
440440
if !o_ts.anynonpass
441-
println(" \033[32;1mSUCCESS\033[0m")
441+
printstyled(" SUCCESS\n"; bold=true, color=:green)
442442
else
443-
println(" \033[31;1mFAILURE\033[0m\n")
443+
printstyled(" FAILURE\n\n"; bold=true, color=:red)
444444
skipped > 0 &&
445445
println("$skipped test", skipped > 1 ? "s were" : " was", " skipped due to failure.")
446446
println("The global RNG seed was 0x$(string(seed, base = 16)).\n")

0 commit comments

Comments
 (0)