mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02:00
Fix formatting into std::ostreambuf_iterator using a compiled format (#4312)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
committed by
GitHub
parent
937b7c5c10
commit
898d438571
@@ -2102,6 +2102,10 @@ TEST(format_test, output_iterators) {
|
||||
std::stringstream s;
|
||||
fmt::format_to(std::ostream_iterator<char>(s), "{}", 42);
|
||||
EXPECT_EQ("42", s.str());
|
||||
|
||||
std::stringstream s2;
|
||||
fmt::format_to(std::ostreambuf_iterator<char>(s2), "{}.{:06d}", 42, 43);
|
||||
EXPECT_EQ("42.000043", s2.str());
|
||||
}
|
||||
|
||||
TEST(format_test, fill_via_appender) {
|
||||
|
||||
Reference in New Issue
Block a user