summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--tests/test-libtextstyle.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e42765485..7f0fc1c37e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-13 Bruno Haible <bruno@clisp.org>
+
+ libtextstyle-optional tests: Support the NO_COLOR environment variable.
+ * tests/test-libtextstyle.c (main): Do not emit styling when the
+ environment variable NO_COLOR is set.
+
2019-08-12 Paul Eggert <eggert@cs.ucla.edu>
verify: improve diagnostic quality in recent GCC
diff --git a/tests/test-libtextstyle.c b/tests/test-libtextstyle.c
index 970713f821..a6567f9f5a 100644
--- a/tests/test-libtextstyle.c
+++ b/tests/test-libtextstyle.c
@@ -57,7 +57,9 @@ main (int argc, char *argv[])
#if HAVE_LIBTEXTSTYLE
if (color_mode == color_yes
- || (color_mode == color_tty && isatty (STDOUT_FILENO))
+ || (color_mode == color_tty
+ && isatty (STDOUT_FILENO)
+ && getenv ("NO_COLOR") == NULL)
|| color_mode == color_html)
{
/* If no style file is explicitly specified, use the default in the