cli: fix unused callback in test_if_subcommands_parse_args (#7731)

pull/7738/head
Alicia Woitte 2020-12-31 03:16:05 -05:00 committed by GitHub
parent 7ade1a966c
commit 9f3dd6e18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -24,13 +24,13 @@ fn test_if_subcommands_parse_args() {
} }
subcmd := cli.Command{ subcmd := cli.Command{
name: 'subcommand' name: 'subcommand'
execute: empty_func execute: if_subcommands_parse_args_func
} }
cmd.add_command(subcmd) cmd.add_command(subcmd)
cmd.parse(['command', 'subcommand', 'arg0', 'arg1']) cmd.parse(['command', 'subcommand', 'arg0', 'arg1'])
} }
fn if_subcommands_parse_args_func(cmd cli.Command) { fn if_subcommands_parse_args_func(cmd cli.Command) ? {
assert cmd.name == 'subcommand' && compare_arrays(cmd.args, ['arg0', 'arg1']) assert cmd.name == 'subcommand' && compare_arrays(cmd.args, ['arg0', 'arg1'])
} }