mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-06 08:26:15 +02:00
Update scan test
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user