Fix handling of invalid Unicode in precision

This commit is contained in:
Victor Zverovich
2023-11-18 07:54:36 -10:00
parent 864a8b5f38
commit c13753a70c
2 changed files with 16 additions and 8 deletions

View File

@@ -1050,6 +1050,7 @@ TEST(format_test, precision) {
EXPECT_EQ("st", fmt::format("{0:.2}", "str"));
EXPECT_EQ("вожык", fmt::format("{0:.5}", "вожыкі"));
EXPECT_EQ("123456", fmt::format("{0:.6}", "123456\xad"));
}
TEST(format_test, runtime_precision) {