提交 cdf22107 作者: Matt Bell 提交者: Juan Batiz-Benet

commands: Fixed tests

上级 92f2e844
......@@ -5,8 +5,8 @@ import "testing"
func TestOptionValidation(t *testing.T) {
cmd := Command{
Options: []Option{
Option{[]string{"b", "beep"}, Int},
Option{[]string{"B", "boop"}, String},
Option{[]string{"b", "beep"}, Int, "enables beeper"},
Option{[]string{"B", "boop"}, String, "password for booper"},
},
Run: func(res Response, req Request) {},
}
......@@ -83,14 +83,14 @@ func TestRegistration(t *testing.T) {
cmdA := &Command{
Options: []Option{
Option{[]string{"beep"}, Int},
Option{[]string{"beep"}, Int, "number of beeps"},
},
Run: noop,
}
cmdB := &Command{
Options: []Option{
Option{[]string{"beep"}, Int},
Option{[]string{"beep"}, Int, "number of beeps"},
},
Run: noop,
Subcommands: map[string]*Command{
......@@ -100,7 +100,7 @@ func TestRegistration(t *testing.T) {
cmdC := &Command{
Options: []Option{
Option{[]string{"encoding"}, String},
Option{[]string{"encoding"}, String, "data encoding type"},
},
Run: noop,
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论