1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cli: various improvements (#6180)

This commit is contained in:
Lukas Neubert
2020-08-20 23:14:53 +02:00
committed by GitHub
parent b88569c845
commit 93e6c3df6a
6 changed files with 71 additions and 73 deletions

View File

@ -51,7 +51,6 @@ fn test_if_command_has_default_version_subcommand_if_version_is_set() {
assert has_command(cmd, 'version')
}
fn flag_should_be_set(cmd cli.Command) ? {
flag := cmd.flags.get_string('flag')?
assert flag == 'value'
@ -83,7 +82,6 @@ fn test_if_flag_gets_set_with_abbrev() {
cmd.parse(['command', '--flag', 'value'])
}
fn flag_should_have_value_of_42(cmd cli.Command) ? {
flag := cmd.flags.get_string('flag')?
assert flag == 'value'
@ -107,7 +105,6 @@ fn test_if_multiple_flags_get_set() {
cmd.parse(['command', '-flag', 'value', '-value', '42'])
}
fn flag_is_set_in_subcommand(cmd cli.Command) ? {
flag := cmd.flags.get_string('flag') or {
panic(err)