File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/server/routes/webhooks Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ mod tests {
169
169
arg2: Option <String > = "arg2" ,
170
170
} )
171
171
172
- "bar" => Bar ( BarArgs {
172
+ "bar" | "bar-alias" => Bar ( BarArgs {
173
173
arg3: Option <String > = "arg3" ,
174
174
} )
175
175
@@ -201,6 +201,7 @@ mod tests {
201
201
} )
202
202
) ;
203
203
test ! ( "bar" , TestCommand :: Bar ( BarArgs { arg3: None } ) ) ;
204
+ test ! ( "bar-alias" , TestCommand :: Bar ( BarArgs { arg3: None } ) ) ;
204
205
test ! ( "" , TestCommand :: Baz ( BazArgs { arg4: None } ) ) ;
205
206
206
207
// Test if args are parsed correctly
@@ -230,6 +231,12 @@ mod tests {
230
231
arg3: Some ( "foo \" bar" . into( ) ) ,
231
232
} )
232
233
) ;
234
+ test ! (
235
+ "bar-alias arg3=\" foo \\ \" bar\" " ,
236
+ TestCommand :: Bar ( BarArgs {
237
+ arg3: Some ( "foo \" bar" . into( ) ) ,
238
+ } )
239
+ ) ;
233
240
test ! ( "arg4=42" , TestCommand :: Baz ( BazArgs { arg4: Some ( 42 ) } ) ) ;
234
241
235
242
// Test if invalid args are rejected
You can’t perform that action at this time.
0 commit comments