mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
cli: fix default flags when their command equivalents are disabled (#21469)
* always replace `\r\n` with `\n` * fix * test * cleanup * add doc comment
This commit is contained in:
parent
4320f8641b
commit
c0fec31bef
9 changed files with 69 additions and 13 deletions
11
vlib/cli/testdata/default_command_no_flag_err.vv
vendored
Normal file
11
vlib/cli/testdata/default_command_no_flag_err.vv
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import cli { Command, CommandFlag }
|
||||
|
||||
fn main() {
|
||||
mut cmd := Command{
|
||||
name: 'foo'
|
||||
defaults: struct {
|
||||
man: CommandFlag{true, false}
|
||||
}
|
||||
}
|
||||
cmd.parse(['foo', '-man'])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue