Add file stream support for stylized text printing. (#967)
This commit is contained in:
committed by
Victor Zverovich
parent
f54f3d0fb7
commit
749276072f
@@ -228,4 +228,8 @@ TEST(ColorsTest, Colors) {
|
||||
stdout,
|
||||
fmt::print(fg(fmt::color::blue) | fmt::emphasis::bold, "blue/bold"),
|
||||
"\x1b[1m\x1b[38;2;000;000;255mblue/bold\x1b[0m");
|
||||
EXPECT_WRITE(stderr, fmt::print(stderr, fmt::emphasis::bold, "bold error"),
|
||||
"\x1b[1mbold error\x1b[0m");
|
||||
EXPECT_WRITE(stderr, fmt::print(stderr, fg(fmt::color::blue), "blue log"),
|
||||
"\x1b[38;2;000;000;255mblue log\x1b[0m");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user