mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Comment.
This commit is contained in:
@ -1655,6 +1655,7 @@ TEST(FormatIntTest, FormatDec) {
|
|||||||
|
|
||||||
#ifdef FMT_USE_DUP
|
#ifdef FMT_USE_DUP
|
||||||
|
|
||||||
|
// RAII for file descriptors.
|
||||||
class File {
|
class File {
|
||||||
private:
|
private:
|
||||||
int fd_;
|
int fd_;
|
||||||
@ -1666,6 +1667,8 @@ class File {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST(FormatTest, PrintColored) {
|
TEST(FormatTest, PrintColored) {
|
||||||
|
// Temporarily redirect stdout to a file and check if PrintColored adds
|
||||||
|
// necessary ANSI escape sequences.
|
||||||
std::fflush(stdout);
|
std::fflush(stdout);
|
||||||
File saved_stdio(dup(1));
|
File saved_stdio(dup(1));
|
||||||
EXPECT_NE(-1, saved_stdio.fd());
|
EXPECT_NE(-1, saved_stdio.fd());
|
||||||
|
Reference in New Issue
Block a user