Commit 13743039 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands/cli: Added test for detecting duplicate options

parent fa0cf105
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment