Skip to content

Commit 7cbbd5d

Browse files
add test case for all emphasis flags set
1 parent 3b80433 commit 7cbbd5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/color-test.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ TEST(color_test, format) {
113113
EXPECT_EQ(fmt::format("{}", fmt::styled("bar", fg(fmt::color::blue) |
114114
fmt::emphasis::underline)),
115115
"\x1b[4m\x1b[38;2;000;000;255mbar\x1b[0m");
116+
EXPECT_EQ(
117+
fmt::format(
118+
"{}", fmt::styled(
119+
"all", fmt::emphasis::bold | fmt::emphasis::faint |
120+
fmt::emphasis::italic |
121+
fmt::emphasis::underline | fmt::emphasis::blink |
122+
fmt::emphasis::reverse | fmt::emphasis::conceal |
123+
fmt::emphasis::strikethrough)),
124+
"\x1b[1m\x1b[2m\x1b[3m\x1b[4m\x1b[5m\x1b[7m\x1b[8m\x1b[9mall\x1b[0m");
116125
}
117126

118127
TEST(color_test, format_to) {

0 commit comments

Comments
 (0)