lib: tst_ansi_colors: Fix output is terminal check
The newlib prints to stderr, hence we have to pass which file descriptor
we would use to the tst_color_enabled() function.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/lib/tst_test.c b/lib/tst_test.c
index e78b412..1518c7c 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -209,7 +209,7 @@
str += ret;
size -= ret;
- if (tst_color_enabled())
+ if (tst_color_enabled(STDERR_FILENO))
ret = snprintf(str, size, "%s%s: %s", tst_ttype2color(ttype),
res, ANSI_COLOR_RESET);
else