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
a9b73f81
Commit
a9b73f81
authored
Jan 31, 2016
by
Billy Donahue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #699 from achimnol/master
Add tmux and tmux-256color to the colored terminal list.
parents
82b11b8c
340c6b33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
gtest.cc
googletest/src/gtest.cc
+2
-0
gtest_unittest.cc
googletest/test/gtest_unittest.cc
+6
-0
No files found.
googletest/src/gtest.cc
View file @
a9b73f81
...
...
@@ -2930,6 +2930,8 @@ bool ShouldUseColor(bool stdout_is_tty) {
String
::
CStringEquals
(
term
,
"xterm-256color"
)
||
String
::
CStringEquals
(
term
,
"screen"
)
||
String
::
CStringEquals
(
term
,
"screen-256color"
)
||
String
::
CStringEquals
(
term
,
"tmux"
)
||
String
::
CStringEquals
(
term
,
"tmux-256color"
)
||
String
::
CStringEquals
(
term
,
"rxvt-unicode"
)
||
String
::
CStringEquals
(
term
,
"rxvt-unicode-256color"
)
||
String
::
CStringEquals
(
term
,
"linux"
)
||
...
...
googletest/test/gtest_unittest.cc
View file @
a9b73f81
...
...
@@ -6840,6 +6840,12 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
SetEnv
(
"TERM"
,
"screen-256color"
);
// TERM supports colors.
EXPECT_TRUE
(
ShouldUseColor
(
true
));
// Stdout is a TTY.
SetEnv
(
"TERM"
,
"tmux"
);
// TERM supports colors.
EXPECT_TRUE
(
ShouldUseColor
(
true
));
// Stdout is a TTY.
SetEnv
(
"TERM"
,
"tmux-256color"
);
// TERM supports colors.
EXPECT_TRUE
(
ShouldUseColor
(
true
));
// Stdout is a TTY.
SetEnv
(
"TERM"
,
"rxvt-unicode"
);
// TERM supports colors.
EXPECT_TRUE
(
ShouldUseColor
(
true
));
// Stdout is a TTY.
...
...
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