diff options
author | whame <whame@users.noreply.github.com> | 2017-11-07 14:22:50 (GMT) |
---|---|---|
committer | whame <whame@users.noreply.github.com> | 2017-11-07 14:22:50 (GMT) |
commit | 82447f23be9474bee8d883128b3f93dde9697334 (patch) | |
tree | bda4f2462e01b0a00d26522ccda386cd50a8e41c /googletest | |
parent | d175c8bf823e709d570772b038757fadf63bc632 (diff) | |
download | googletest-82447f23be9474bee8d883128b3f93dde9697334.zip googletest-82447f23be9474bee8d883128b3f93dde9697334.tar.gz googletest-82447f23be9474bee8d883128b3f93dde9697334.tar.bz2 |
Fixes issue #826 by treating MinGW as "non-Windows" when determining colored outputrefs/pull/1324/head
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/src/gtest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index d77f676..749e829 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -2884,7 +2884,7 @@ enum GTestColor { }; #if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \ - !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW // Returns the character attribute for the given color. WORD GetColorAttribute(GTestColor color) { @@ -2943,7 +2943,7 @@ bool ShouldUseColor(bool stdout_is_tty) { const char* const gtest_color = GTEST_FLAG(color).c_str(); if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { -#if GTEST_OS_WINDOWS +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW // On Windows the TERM variable is usually not set, but the // console there does support colors. return stdout_is_tty; @@ -3001,7 +3001,7 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) { } #if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \ - !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); // Gets the current text color. |