| 71 | )"; |
| 72 | |
| 73 | TEST(OpGenLibTest, MultilinePBTxt) { |
| 74 | // Non-multiline pbtxt |
| 75 | const string pbtxt = R"(foo: "abc" |
| 76 | foo: "" |
| 77 | foo: "\n\n" |
| 78 | foo: "abc\nEND" |
| 79 | foo: "ghi\njkl\n" |
| 80 | bar: "quotes:\"" |
| 81 | )"; |
| 82 | |
| 83 | // Field "foo" converted to multiline but not "bar". |
| 84 | const string ml_foo = R"(foo: <<END |
| 85 | abc |
| 86 | END |
| 87 | foo: <<END |
| 88 | |
| 89 | END |
| 90 | foo: <<END |
| 91 | |
| 92 | |
| 93 | |
| 94 | END |
| 95 | foo: <<END0 |
| 96 | abc |
| 97 | END |
| 98 | END0 |
| 99 | foo: <<END |
| 100 | ghi |
| 101 | jkl |
| 102 | |
| 103 | END |
| 104 | bar: "quotes:\"" |
| 105 | )"; |
| 106 | |
| 107 | // Both fields "foo" and "bar" converted to multiline. |
| 108 | const string ml_foo_bar = R"(foo: <<END |
| 109 | abc |
| 110 | END |
| 111 | foo: <<END |
| 112 | |
| 113 | END |
| 114 | foo: <<END |
| 115 | |
| 116 | |
| 117 | |
| 118 | END |
| 119 | foo: <<END0 |
| 120 | abc |
| 121 | END |
| 122 | END0 |
| 123 | foo: <<END |
| 124 | ghi |
| 125 | jkl |
| 126 | |
| 127 | END |
| 128 | bar: <<END |
| 129 | quotes:" |
| 130 | END |
nothing calls this directly
no test coverage detected