@@ -184,39 +184,50 @@ static Stream<Arguments> parseWithQuotedOptionData() {
184184 Arguments .of ("mycommand --option=\\ \" value\\ \" " , "option" , ' ' , "\\ \" value\\ \" " ),
185185 Arguments .of ("mycommand --option=\" value\" " , "option" , ' ' , "value" ),
186186 Arguments .of ("mycommand --option=\" value1 value2\" " , "option" , ' ' , "value1 value2" ),
187+ Arguments .of ("mycommand --option=\" value1=value2\" " , "option" , ' ' , "value1=value2" ),
187188 Arguments .of ("mycommand --option=value1\" inside\" value2" , "option" , ' ' , "value1\" inside\" value2" ),
188189 Arguments .of ("mycommand --option=\" value1 \\ \" inside\\ \" value2\" " , "option" , ' ' ,
189190 "value1 \" inside\" value2" ),
190191 Arguments .of ("mycommand --option=value1'inside'value2" , "option" , ' ' , "value1'inside'value2" ),
191192 Arguments .of ("mycommand --option=\" value1 'inside' value2\" " , "option" , ' ' , "value1 'inside' value2" ),
193+ Arguments .of ("mycommand --option=value" , "option" , ' ' , "value" ),
194+ Arguments .of ("mycommand --option=\" value\" " , "option" , ' ' , "value" ),
192195
193196 Arguments .of ("mycommand --option value" , "option" , ' ' , "value" ),
194197 Arguments .of ("mycommand --option \\ \" value\\ \" " , "option" , ' ' , "\\ \" value\\ \" " ),
195198 Arguments .of ("mycommand --option \" value\" " , "option" , ' ' , "value" ),
196199 Arguments .of ("mycommand --option \" value1 value2\" " , "option" , ' ' , "value1 value2" ),
200+ Arguments .of ("mycommand --option \" value1=value2\" " , "option" , ' ' , "value1=value2" ),
197201 Arguments .of ("mycommand --option value1\" inside\" value2" , "option" , ' ' , "value1\" inside\" value2" ),
198202 Arguments .of ("mycommand --option \" value1 \\ \" inside\\ \" value2\" " , "option" , ' ' ,
199203 "value1 \" inside\" value2" ),
200204 Arguments .of ("mycommand --option value1'inside'value2" , "option" , ' ' , "value1'inside'value2" ),
201205 Arguments .of ("mycommand --option \" value1 'inside' value2\" " , "option" , ' ' , "value1 'inside' value2" ),
206+ Arguments .of ("mycommand --option value" , "option" , ' ' , "value" ),
207+ Arguments .of ("mycommand --option \" value\" " , "option" , ' ' , "value" ),
202208
203209 Arguments .of ("mycommand -o=value" , "" , 'o' , "value" ),
204210 Arguments .of ("mycommand -o=\\ \" value\\ \" " , "" , 'o' , "\\ \" value\\ \" " ),
205211 Arguments .of ("mycommand -o=\" value\" " , "" , 'o' , "value" ),
206212 Arguments .of ("mycommand -o=\" value1 value2\" " , "" , 'o' , "value1 value2" ),
213+ Arguments .of ("mycommand -o=\" value1=value2\" " , "" , 'o' , "value1=value2" ),
207214 Arguments .of ("mycommand -o=value1\" inside\" value2" , "" , 'o' , "value1\" inside\" value2" ),
208215 Arguments .of ("mycommand -o=\" value1 \\ \" inside\\ \" value2\" " , "" , 'o' , "value1 \" inside\" value2" ),
209216 Arguments .of ("mycommand -o=value1'inside'value2" , "" , 'o' , "value1'inside'value2" ),
210217 Arguments .of ("mycommand -o=\" value1 'inside' value2\" " , "" , 'o' , "value1 'inside' value2" ),
218+ Arguments .of ("mycommand -o=value" , "" , 'o' , "value" ),
219+ Arguments .of ("mycommand -o=\" value\" " , "" , 'o' , "value" ),
211220
212221 Arguments .of ("mycommand -o value" , "" , 'o' , "value" ),
213222 Arguments .of ("mycommand -o \\ \" value\\ \" " , "" , 'o' , "\\ \" value\\ \" " ),
214223 Arguments .of ("mycommand -o \" value\" " , "" , 'o' , "value" ),
215224 Arguments .of ("mycommand -o \" value1 value2\" " , "" , 'o' , "value1 value2" ),
225+ Arguments .of ("mycommand -o \" value1=value2\" " , "" , 'o' , "value1=value2" ),
216226 Arguments .of ("mycommand -o value1\" inside\" value2" , "" , 'o' , "value1\" inside\" value2" ),
217227 Arguments .of ("mycommand -o \" value1 \\ \" inside\\ \" value2\" " , "" , 'o' , "value1 \" inside\" value2" ),
218228 Arguments .of ("mycommand -o value1'inside'value2" , "" , 'o' , "value1'inside'value2" ),
219- Arguments .of ("mycommand -o \" value1 'inside' value2\" " , "" , 'o' , "value1 'inside' value2" ));
229+ Arguments .of ("mycommand -o \" value1 'inside' value2\" " , "" , 'o' , "value1 'inside' value2" ),
230+ Arguments .of ("mycommand -o \" value\" " , "" , 'o' , "value" ));
220231 }
221232
222233 @ ParameterizedTest
@@ -236,10 +247,12 @@ static Stream<Arguments> parseWithQuotedArgumentData() {
236247 Arguments .of ("mycommand -- \\ \" value\\ \" " , "\\ \" value\\ \" " ),
237248 Arguments .of ("mycommand -- \" value\" " , "value" ),
238249 Arguments .of ("mycommand -- \" value1 value2\" " , "value1 value2" ),
250+ Arguments .of ("mycommand -- \" value1=value2\" " , "value1=value2" ),
239251 Arguments .of ("mycommand -- value1\" inside\" value2" , "value1\" inside\" value2" ),
240252 Arguments .of ("mycommand -- \" value1 \\ \" inside\\ \" value2\" " , "value1 \" inside\" value2" ),
241253 Arguments .of ("mycommand -- value1'inside'value2" , "value1'inside'value2" ),
242- Arguments .of ("mycommand -- \" value1 'inside' value2\" " , "value1 'inside' value2" ));
254+ Arguments .of ("mycommand -- \" value1 'inside' value2\" " , "value1 'inside' value2" ),
255+ Arguments .of ("mycommand -- value" , "value" ), Arguments .of ("mycommand -- \" value\" " , "value" ));
243256 }
244257
245258}
0 commit comments