Fix handling of thousands separator (#353)

(cherry picked from commit 0e6df7e511)
This commit is contained in:
Victor Zverovich
2016-10-23 11:52:39 +02:00
committed by Jonathan Müller
parent 1127e7a953
commit 27f604a153
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -1229,7 +1229,9 @@ TEST(FormatterTest, FormatIntLocale) {
lconv lc = {};
char sep[] = "--";
lc.thousands_sep = sep;
EXPECT_CALL(mock, localeconv()).WillOnce(testing::Return(&lc));
EXPECT_CALL(mock, localeconv()).Times(3).WillRepeatedly(testing::Return(&lc));
EXPECT_EQ("123", format("{:n}", 123));
EXPECT_EQ("1--234", format("{:n}", 1234));
EXPECT_EQ("1--234--567", format("{:n}", 1234567));
}