unittest: default no color if stdout is not a tty (#7424)
We accept a new environment variable, NIMTEST_COLOR, which override the effect of NIMTEST_NO_COLOR. The environment variable, NIMTEST_COLOR, can be 'never' or 'always', which set the color output to false or true, respectively.
This commit is contained in:
parent
f3db632b1d
commit
f543388959
2 changed files with 20 additions and 5 deletions
|
|
@ -427,7 +427,7 @@ include categories
|
|||
# if status: reSuccess else: reOutputsDiffer)
|
||||
|
||||
proc main() =
|
||||
os.putenv "NIMTEST_NO_COLOR", "1"
|
||||
os.putenv "NIMTEST_COLOR", "never"
|
||||
os.putenv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES"
|
||||
|
||||
backend.open()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue