[printf] Test empty format string, and empty arg string (#2018)

Issue: #1058
This commit is contained in:
David Neto
2024-07-23 15:11:34 -04:00
committed by GitHub
parent 5b5e43e1fb
commit 0be82dce5e

View File

@@ -714,6 +714,12 @@ testCase testCaseChar = {
std::vector<printDataGenParameters> printStringGenParameters = { std::vector<printDataGenParameters> printStringGenParameters = {
// empty format
{ {""}, "\"foo\"" },
// empty argument
{ {"%s"}, "\"\"" },
//(Minimum)Four-wide,zero-filled,default(right)-justified //(Minimum)Four-wide,zero-filled,default(right)-justified
{ { "%4s" }, "\"foo\"" }, { { "%4s" }, "\"foo\"" },
@@ -766,6 +772,10 @@ std::vector<printDataGenParameters> printStringGenParameters = {
std::vector<std::string> correctBufferString = { std::vector<std::string> correctBufferString = {
"",
"",
" foo", " foo",
"f", "f",