Fix check_format_string (#925)

This commit is contained in:
Victor Zverovich
2018-11-03 16:20:45 -07:00
parent 36161284e2
commit a23d592472
3 changed files with 21 additions and 11 deletions
+9
View File
@@ -509,3 +509,12 @@ TEST(PrintfTest, VPrintf) {
EXPECT_WRITE(stdout, fmt::vfprintf(stdout, "%d", args), "42");
EXPECT_WRITE(stdout, fmt::vfprintf(std::cout, "%d", args), "42");
}
template<typename... Args>
void check_format_string_regression(fmt::string_view s, const Args&... args) {
fmt::sprintf(s, args...);
}
TEST(PrintfTest, CheckFormatStringRegression) {
check_format_string_regression("%c%s", 'x', "");
}