Update scan test

This commit is contained in:
Victor Zverovich
2023-12-22 06:35:36 -08:00
parent dbd9c89b3c
commit 1ca1a4a7a9
2 changed files with 58 additions and 38 deletions
+2 -2
View File
@@ -122,11 +122,11 @@ TEST(scan_test, example) {
TEST(scan_test, file) {
fmt::file read_end, write_end;
fmt::file::pipe(read_end, write_end);
fmt::string_view input = "4";
fmt::string_view input = "42";
write_end.write(input.data(), input.size());
write_end.close();
int value = 0;
fmt::scan(read_end.fdopen("r").get(), "{}", value);
EXPECT_EQ(value, 4);
EXPECT_EQ(value, 42);
}
#endif // FMT_USE_FCNTL