Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
82447f23
Commit
82447f23
authored
Nov 07, 2017
by
whame
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue #826 by treating MinGW as "non-Windows" when determining colored output
parent
d175c8bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gtest.cc
googletest/src/gtest.cc
+3
-3
No files found.
googletest/src/gtest.cc
View file @
82447f23
...
@@ -2884,7 +2884,7 @@ enum GTestColor {
...
@@ -2884,7 +2884,7 @@ enum GTestColor {
};
};
#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \
#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.
// Returns the character attribute for the given color.
WORD
GetColorAttribute
(
GTestColor
color
)
{
WORD
GetColorAttribute
(
GTestColor
color
)
{
...
@@ -2943,7 +2943,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
...
@@ -2943,7 +2943,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
const
char
*
const
gtest_color
=
GTEST_FLAG
(
color
).
c_str
();
const
char
*
const
gtest_color
=
GTEST_FLAG
(
color
).
c_str
();
if
(
String
::
CaseInsensitiveCStringEquals
(
gtest_color
,
"auto"
))
{
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
// On Windows the TERM variable is usually not set, but the
// console there does support colors.
// console there does support colors.
return
stdout_is_tty
;
return
stdout_is_tty
;
...
@@ -3001,7 +3001,7 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) {
...
@@ -3001,7 +3001,7 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) {
}
}
#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \
#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
);
const
HANDLE
stdout_handle
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
// Gets the current text color.
// Gets the current text color.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment