This patch keeps the libtextstyle-optional test in sync with a recent change in libtextstyle. https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=7040b13946b3dce5fbe2be8ecfda11e03eed7028
2019-08-13 Bruno Haible <[email protected]> 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. diff --git a/tests/test-libtextstyle.c b/tests/test-libtextstyle.c index 970713f..a6567f9 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
