aboutsummaryrefslogtreecommitdiff
path: root/test/gtest-extra.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtest-extra.cc')
-rw-r--r--test/gtest-extra.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/gtest-extra.cc b/test/gtest-extra.cc
index 542e4b5e..3d27cf96 100644
--- a/test/gtest-extra.cc
+++ b/test/gtest-extra.cc
@@ -11,8 +11,8 @@
using fmt::file;
-output_redirect::output_redirect(FILE* f) : file_(f) {
- flush();
+output_redirect::output_redirect(FILE* f, bool flush) : file_(f) {
+ if (flush) this->flush();
int fd = FMT_POSIX(fileno(f));
// Create a file object referring to the original file.
original_ = file::dup(fd);