Skip to content

Commit

Permalink
Print results of runtests with printstyled (#55780)
Browse files Browse the repository at this point in the history
This ensures escape characters are used only if `stdout` can accept
them.
  • Loading branch information
giordano authored Sep 15, 2024
1 parent 4633607 commit a993cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ cd(@__DIR__) do
# o_ts.verbose = true # set to true to show all timings when successful
Test.print_test_results(o_ts, 1)
if !o_ts.anynonpass
println(" \033[32;1mSUCCESS\033[0m")
printstyled(" SUCCESS\n"; bold=true, color=:green)
else
println(" \033[31;1mFAILURE\033[0m\n")
printstyled(" FAILURE\n\n"; bold=true, color=:red)
skipped > 0 &&
println("$skipped test", skipped > 1 ? "s were" : " was", " skipped due to failure.")
println("The global RNG seed was 0x$(string(seed, base = 16)).\n")
Expand Down

0 comments on commit a993cd8

Please sign in to comment.