File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,9 @@ pub struct PingGoalsArgs {
176
176
/// Helper function to parse CLI arguments without any colored help or error output.
177
177
pub fn parse_cli < ' a , T : Parser , I : Iterator < Item = & ' a str > > ( input : I ) -> anyhow:: Result < T > {
178
178
// Add a fake first argument, which is expected by clap
179
- let input = std:: iter:: once ( "triagebot" ) . chain ( input) ;
179
+ let input = std:: iter:: once ( "triagebot" )
180
+ . chain ( input)
181
+ . map ( |i| i. to_lowercase ( ) ) ;
180
182
181
183
let matches = T :: command ( )
182
184
. color ( ColorChoice :: Never )
@@ -199,6 +201,14 @@ mod tests {
199
201
) ;
200
202
}
201
203
204
+ #[ test]
205
+ fn uppercase ( ) {
206
+ assert_eq ! (
207
+ parse_chat( & [ "Work" , "show" ] ) ,
208
+ ChatCommand :: Work ( WorkqueueCmd :: Show )
209
+ ) ;
210
+ }
211
+
202
212
#[ test]
203
213
fn add_command ( ) {
204
214
assert_eq ! (
You can’t perform that action at this time.
0 commit comments