mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 03:54:10 +02:00
Fix check_format_string (#925)
This commit is contained in:
@@ -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', "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user