Fix sign handling in 'L'

This commit is contained in:
Victor Zverovich
2020-06-13 06:57:19 -07:00
parent 23b976a615
commit 8c88abde64
2 changed files with 3 additions and 0 deletions

View File

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