Fix handling of thousand separator (#1927)

This commit is contained in:
Victor Zverovich
2020-10-10 07:23:36 -07:00
parent bf19051a9f
commit a5e7e7db95
2 changed files with 7 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ TEST(LocaleTest, Format) {
EXPECT_EQ("1234567", fmt::format(std::locale(), "{:L}", 1234567));
EXPECT_EQ("1~234~567", fmt::format(loc, "{:L}", 1234567));
EXPECT_EQ("-1~234~567", fmt::format(loc, "{:L}", -1234567));
EXPECT_EQ("-256", fmt::format(loc, "{:L}", -256));
fmt::format_arg_store<fmt::format_context, int> as{1234567};
EXPECT_EQ("1~234~567", fmt::vformat(loc, "{:L}", fmt::format_args(as)));
std::string s;