Improve the pipe API

This commit is contained in:
Victor Zverovich
2024-01-01 15:55:37 -08:00
parent 398ddb8fec
commit c142385033
9 changed files with 111 additions and 132 deletions
+2 -3
View File
@@ -517,9 +517,8 @@ TEST(printf_test, examples) {
}
TEST(printf_test, printf_error) {
fmt::file read_end, write_end;
fmt::file::pipe(read_end, write_end);
int result = fmt::fprintf(read_end.fdopen("r").get(), "test");
auto pipe = fmt::pipe();
int result = fmt::fprintf(pipe.read_end.fdopen("r").get(), "test");
EXPECT_LT(result, 0);
}
#endif