@@ -39,6 +39,7 @@ After=baz.service
3939 & UnitOption {"Unit" , "Description" , "Bar" },
4040 & UnitOption {"Unit" , "Requires" , "baz.service" },
4141 & UnitOption {"Unit" , "After" , "baz.service" },
42+ & UnitOption {"Unit" , "" , "" },
4243 },
4344 },
4445
@@ -56,8 +57,14 @@ Pants=on
5657` ),
5758 []* UnitOption {
5859 & UnitOption {"Unit" , "Description" , "Foo" },
60+ & UnitOption {"Unit" , "" , "\n " },
61+ & UnitOption {"Unit" , "" , "" },
5962 & UnitOption {"Service" , "ExecStart" , "/usr/bin/sleep infinity" },
63+ & UnitOption {"Service" , "" , "\n " },
64+ & UnitOption {"Service" , "" , "" },
6065 & UnitOption {"X-Third-Party" , "Pants" , "on" },
66+ & UnitOption {"X-Third-Party" , "" , "\n " },
67+ & UnitOption {"X-Third-Party" , "" , "" },
6168 },
6269 },
6370
@@ -67,7 +74,11 @@ Pants=on
6774[Service]
6875[X-Third-Party]
6976` ),
70- []* UnitOption {},
77+ []* UnitOption {
78+ & UnitOption {"Unit" , "" , "" },
79+ & UnitOption {"Service" , "" , "" },
80+ & UnitOption {"X-Third-Party" , "" , "" },
81+ },
7182 },
7283
7384 // multiple values not special-cased
@@ -77,6 +88,7 @@ Environment= "FOO=BAR" "BAZ=QUX"
7788` ),
7889 []* UnitOption {
7990 & UnitOption {"Service" , "Environment" , "\" FOO=BAR\" \" BAZ=QUX\" " },
91+ & UnitOption {"Service" , "" , "" },
8092 },
8193 },
8294
@@ -89,6 +101,7 @@ Description= Unnecessarily wrapped \
89101 []* UnitOption {
90102 & UnitOption {"Unit" , "Description" , `Unnecessarily wrapped \
91103 words here` },
104+ & UnitOption {"Unit" , "" , "" },
92105 },
93106 },
94107
@@ -106,6 +119,7 @@ Description=Bar
106119` ),
107120 []* UnitOption {
108121 & UnitOption {"Unit" , "Description" , "Bar" },
122+ & UnitOption {"Unit" , "" , "" },
109123 },
110124 },
111125
121135` ),
122136 []* UnitOption {
123137 & UnitOption {"Unit" , "Description" , "Bar\\ \n # comment alpha" },
138+ & UnitOption {"Unit" , "" , "\n " },
124139 & UnitOption {"Unit" , "Description" , "Bar\\ \n # comment bravo \\ \n Baz" },
140+ & UnitOption {"Unit" , "" , "" },
125141 },
126142 },
127143
@@ -133,6 +149,7 @@ Description=Bar
133149` ),
134150 []* UnitOption {
135151 & UnitOption {"Unit" , "Description" , "Bar" },
152+ & UnitOption {"Unit" , "" , "" },
136153 },
137154 },
138155
@@ -144,6 +161,7 @@ Description=Bar
144161` ),
145162 []* UnitOption {
146163 & UnitOption {"Unit" , "Description" , "Bar" },
164+ & UnitOption {"Unit" , "" , "" },
147165 },
148166 },
149167
@@ -154,6 +172,7 @@ Description=Bar
154172` ),
155173 []* UnitOption {
156174 & UnitOption {"Unit" , "<<<<<<<<" , "Bar" },
175+ & UnitOption {"Unit" , "" , "" },
157176 },
158177 },
159178
@@ -164,6 +183,7 @@ Some Thing = Bar
164183` ),
165184 []* UnitOption {
166185 & UnitOption {"Unit" , "Some Thing" , "Bar" },
186+ & UnitOption {"Unit" , "" , "" },
167187 },
168188 },
169189
@@ -173,6 +193,7 @@ Some Thing = Bar
173193Description=Bar` ),
174194 []* UnitOption {
175195 & UnitOption {"Unit" , "Description" , "Bar" },
196+ & UnitOption {"Unit" , "" , "" },
176197 },
177198 },
178199
@@ -182,6 +203,7 @@ Description=Bar`),
182203Description=Bar \` ),
183204 []* UnitOption {
184205 & UnitOption {"Unit" , "Description" , "Bar \\ " },
206+ & UnitOption {"Unit" , "" , "" },
185207 },
186208 },
187209
@@ -191,6 +213,7 @@ Description=Bar \`),
191213µ☃=ÇôrèÕ$` ),
192214 []* UnitOption {
193215 & UnitOption {"©" , "µ☃" , "ÇôrèÕ$" },
216+ & UnitOption {"©" , "" , "" },
194217 },
195218 },
196219
@@ -200,7 +223,9 @@ Description=Bar \`),
200223 Description =words here
201224` ),
202225 []* UnitOption {
226+ & UnitOption {"Unit" , "" , " " },
203227 & UnitOption {"Unit" , "Description" , "words here" },
228+ & UnitOption {"Unit" , "" , "" },
204229 },
205230 },
206231
@@ -210,6 +235,7 @@ Description=Bar \`),
210235Description= words here ` ),
211236 []* UnitOption {
212237 & UnitOption {"Unit" , "Description" , "words here" },
238+ & UnitOption {"Unit" , "" , "" },
213239 },
214240 },
215241
@@ -220,6 +246,7 @@ Description= words here \
220246 ` ),
221247 []* UnitOption {
222248 & UnitOption {"Unit" , "Description" , "words here \\ \n " },
249+ & UnitOption {"Unit" , "" , "" },
223250 },
224251 },
225252
@@ -230,6 +257,7 @@ ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"
230257` ),
231258 []* UnitOption {
232259 & UnitOption {"Service" , "ExecStart" , `/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"` },
260+ & UnitOption {"Service" , "" , "" },
233261 },
234262 },
235263
@@ -239,6 +267,7 @@ ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"
239267ExecStart=/bin/bash echo poof \ ` ),
240268 []* UnitOption {
241269 & UnitOption {"Service" , "ExecStart" , `/bin/bash echo poof \` },
270+ & UnitOption {"Service" , "" , "" },
242271 },
243272 },
244273 // a long unit file line that's just equal to the maximum permitted length
@@ -247,6 +276,7 @@ ExecStart=/bin/bash echo poof \ `),
247276ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."` ),
248277 []* UnitOption {
249278 & UnitOption {"Service" , "ExecStart" , `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."` },
279+ & UnitOption {"Service" , "" , "" },
250280 },
251281 },
252282 // the same, but with a trailing newline
@@ -258,6 +288,7 @@ Option=value
258288 []* UnitOption {
259289 & UnitOption {"Service" , "ExecStart" , `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."` },
260290 & UnitOption {"Service" , "Option" , "value" },
291+ & UnitOption {"Service" , "" , "" },
261292 },
262293 },
263294 }
0 commit comments