mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Test calling RestoreAndRead twice.
This commit is contained in:
parent
536e61386d
commit
03ca48f3e7
@ -569,6 +569,7 @@ TEST(OutputRedirectTest, RestoreAndRead) {
|
|||||||
OutputRedirect redir(file.get());
|
OutputRedirect redir(file.get());
|
||||||
std::fprintf(file.get(), "censored");
|
std::fprintf(file.get(), "censored");
|
||||||
EXPECT_EQ("censored", redir.RestoreAndRead());
|
EXPECT_EQ("censored", redir.RestoreAndRead());
|
||||||
|
EXPECT_EQ("", redir.RestoreAndRead());
|
||||||
std::fprintf(file.get(), "]]]");
|
std::fprintf(file.get(), "]]]");
|
||||||
file = BufferedFile();
|
file = BufferedFile();
|
||||||
EXPECT_READ(read_end, "[[[]]]");
|
EXPECT_READ(read_end, "[[[]]]");
|
||||||
@ -613,8 +614,6 @@ TEST(OutputRedirectTest, ErrorInDtor) {
|
|||||||
write_dup.dup2(write_fd); // "undo" close or dtor of BufferedFile will fail
|
write_dup.dup2(write_fd); // "undo" close or dtor of BufferedFile will fail
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: test calling RestoreAndRead multiple times
|
|
||||||
|
|
||||||
// TODO: test EXPECT_STDOUT and EXPECT_STDERR
|
// TODO: test EXPECT_STDOUT and EXPECT_STDERR
|
||||||
|
|
||||||
// TODO: compile both in C++11 & C++98 mode
|
// TODO: compile both in C++11 & C++98 mode
|
||||||
|
Loading…
Reference in New Issue
Block a user