fix formatting with empty compiled format string (#2042)

This commit is contained in:
Alexey Ochapov
2020-12-02 18:14:57 +03:00
committed by GitHub
parent f43416e1d7
commit 683a74501f
2 changed files with 5 additions and 1 deletions

View File

@@ -173,6 +173,10 @@ TEST(CompileTest, TextAndArg) {
EXPECT_EQ(">>>42<<<", fmt::format(FMT_COMPILE(">>>{}<<<"), 42));
EXPECT_EQ("42!", fmt::format(FMT_COMPILE("{}!"), 42));
}
TEST(CompileTest, Empty) {
EXPECT_EQ("", fmt::format(FMT_COMPILE("")));
}
#endif
#if __cplusplus >= 202002L