Add unit test for daily_filename_format_calculator

This commit is contained in:
Charless Milette
2021-11-15 15:46:22 -05:00
parent a6945d046f
commit ba120e524b
2 changed files with 11 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ struct daily_filename_format_calculator
return buf;
#else
fmt::basic_memory_buffer<filename_t::value_type> tm_format;
tm_format.append(specs.begin(), specs.end());
tm_format.append(filename.c_str(), filename.c_str() + filename.size());
// By appending an extra space we can distinguish an empty result that
// indicates insufficient buffer size from a guaranteed non-empty result
// https://github.com/fmtlib/fmt/issues/2238