diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-09-20 15:42:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 15:42:29 (GMT) |
commit | 8bf297233fd7b976ba05a4fd1f8be6001cf90285 (patch) | |
tree | 51410b01c8e6b3e768cdff5b7883afa2bc1b5e02 /googletest | |
parent | 09560fba443c07cca2d100f5baaf7d651af58f81 (diff) | |
parent | c9fe337ae255baac2c72b4a1099bbad4e181a3a8 (diff) | |
download | googletest-8bf297233fd7b976ba05a4fd1f8be6001cf90285.zip googletest-8bf297233fd7b976ba05a4fd1f8be6001cf90285.tar.gz googletest-8bf297233fd7b976ba05a4fd1f8be6001cf90285.tar.bz2 |
Merge pull request #1843 from matlo607/fix-unittest-msys-ColoredOutputTest
[msys] fix unittest ColoredOutputTest.UsesColorsWhenTermSupportsColors
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port-arch.h | 5 | ||||
-rw-r--r-- | googletest/test/gtest_unittest.cc | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/googletest/include/gtest/internal/gtest-port-arch.h b/googletest/include/gtest/internal/gtest-port-arch.h index f83700e..587ed5e 100644 --- a/googletest/include/gtest/internal/gtest-port-arch.h +++ b/googletest/include/gtest/internal/gtest-port-arch.h @@ -38,14 +38,15 @@ // Determines the platform on which Google Test is compiled. #ifdef __CYGWIN__ # define GTEST_OS_CYGWIN 1 +# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__) +# define GTEST_OS_WINDOWS_MINGW 1 +# define GTEST_OS_WINDOWS 1 #elif defined __SYMBIAN32__ # define GTEST_OS_SYMBIAN 1 #elif defined _WIN32 # define GTEST_OS_WINDOWS 1 # ifdef _WIN32_WCE # define GTEST_OS_WINDOWS_MOBILE 1 -# elif defined(__MINGW__) || defined(__MINGW32__) -# define GTEST_OS_WINDOWS_MINGW 1 # elif defined(WINAPI_FAMILY) # include <winapifamily.h> # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 701ba20..c03b367 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -6826,7 +6826,7 @@ TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) { TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { GTEST_FLAG(color) = "auto"; -#if GTEST_OS_WINDOWS +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW // On Windows, we ignore the TERM variable as it's usually not set. SetEnv("TERM", "dumb"); |