mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-07 01:08:08 +08:00
commands/cli: Added test for detecting duplicate options
This commit is contained in:
parent
117af86ca7
commit
a9fa767b09
@ -30,6 +30,11 @@ func TestOptionParsing(t *testing.T) {
|
||||
t.Error("Returned input was different than expected: %v", input)
|
||||
}
|
||||
|
||||
_, _, err = parseOptions([]string{ "-beep=1", "-boop=2", "-beep=3" })
|
||||
if err == nil {
|
||||
t.Error("Should have failed (duplicate option name)")
|
||||
}
|
||||
|
||||
path, args, err := parsePath([]string{ "test", "beep", "boop" }, cmd)
|
||||
if err != nil {
|
||||
t.Error("Should have passed")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user