Extend printf tests with more %% corner cases (#1986)

We've had a couple of bugs inside mesa/rusticl processing %% correctly.
I've added those cases locally to make sure all corner cases are
properly handled.
This commit is contained in:
Karol Herbst
2024-07-02 18:30:03 +02:00
committed by GitHub
parent 1cd0266ca1
commit 89923f8004

View File

@@ -724,6 +724,12 @@ std::vector<printDataGenParameters> printStringGenParameters = {
{ {"%s"}, "\"%%\"" },
{ {"%s"}, "\"foo%%bar%%bar%%foo\"" },
{ {"%%%s%%"}, "\"foo\"" },
{ {"%%s%s"}, "\"foo\"" },
// special symbols
// nested
@@ -764,6 +770,12 @@ std::vector<std::string> correctBufferString = {
"%%",
"foo%%bar%%bar%%foo",
"%foo%",
"%sfoo",
"\"%%\"",
"\'%%\'",
@@ -819,6 +831,8 @@ std::vector<printDataGenParameters> printFormatStringGenParameters = {
{ {"\'%%\'"} },
{ {"\'foo%%bar%%bar%%foo\'"} },
// tabs
{ {"foo\\t\\t\\tfoo"} },
@@ -849,6 +863,8 @@ std::vector<std::string> correctBufferFormatString = {
"\'%\'",
"\'foo%bar%bar%foo\'",
"foo\t\t\tfoo",
R"(foo