pretty-print.c: skip color selftests if GCC_COLORS is set
gcc/ChangeLog: * pretty-print.c (assert_pp_format_colored): Skip the test if GCC_COLORS is set. (test_pp_format): Remove comment about GCC_COLORS. From-SVN: r237411
This commit is contained in:
parent
09765e3a0a
commit
2fe00b1fba
@ -1,3 +1,9 @@
|
|||||||
|
2016-06-13 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* pretty-print.c (assert_pp_format_colored): Skip the test if
|
||||||
|
GCC_COLORS is set.
|
||||||
|
(test_pp_format): Remove comment about GCC_COLORS.
|
||||||
|
|
||||||
2016-06-13 David Malcolm <dmalcolm@redhat.com>
|
2016-06-13 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
* input.c (test_reading_source_line): Use SELFTEST_LOCATION.
|
* input.c (test_reading_source_line): Use SELFTEST_LOCATION.
|
||||||
|
@ -1266,6 +1266,12 @@ static void
|
|||||||
assert_pp_format_colored (const location &loc, const char *expected,
|
assert_pp_format_colored (const location &loc, const char *expected,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
/* The tests of colorization assume the default color scheme.
|
||||||
|
If GCC_COLORS is set, then the colors have potentially been
|
||||||
|
overridden; skip the test. */
|
||||||
|
if (getenv ("GCC_COLORS"))
|
||||||
|
return;
|
||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
@ -1347,7 +1353,6 @@ test_pp_format ()
|
|||||||
ASSERT_PP_FORMAT_2 ("normal colored normal 12345678",
|
ASSERT_PP_FORMAT_2 ("normal colored normal 12345678",
|
||||||
"normal %rcolored%R normal %x",
|
"normal %rcolored%R normal %x",
|
||||||
"error", 0x12345678);
|
"error", 0x12345678);
|
||||||
/* The following assumes an empty value for GCC_COLORS. */
|
|
||||||
assert_pp_format_colored
|
assert_pp_format_colored
|
||||||
(SELFTEST_LOCATION,
|
(SELFTEST_LOCATION,
|
||||||
"normal \33[01;31m\33[Kcolored\33[m\33[K normal 12345678",
|
"normal \33[01;31m\33[Kcolored\33[m\33[K normal 12345678",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user