Fixed subcommands test
This commit is contained in:
parent
aadcbd0767
commit
97b8d4f54e
|
@ -43,13 +43,13 @@ func TestSubcommand(t *testing.T) {
|
||||||
switch this.Command {
|
switch this.Command {
|
||||||
case "send":
|
case "send":
|
||||||
foundSend = true
|
foundSend = true
|
||||||
if len(this.arguments) != 1 {
|
if len(this.Arguments) != 1 {
|
||||||
t.Fatal("invalid arguments len", len(this.arguments))
|
t.Fatal("invalid arguments len", len(this.Arguments))
|
||||||
}
|
}
|
||||||
|
|
||||||
case "custom":
|
case "custom":
|
||||||
foundCustom = true
|
foundCustom = true
|
||||||
if len(this.arguments) > 0 {
|
if len(this.Arguments) > 0 {
|
||||||
t.Fatal("arguments should be 0 for custom")
|
t.Fatal("arguments should be 0 for custom")
|
||||||
}
|
}
|
||||||
if this.parseType == nil {
|
if this.parseType == nil {
|
||||||
|
@ -58,7 +58,7 @@ func TestSubcommand(t *testing.T) {
|
||||||
|
|
||||||
case "noargs":
|
case "noargs":
|
||||||
foundNoArgs = true
|
foundNoArgs = true
|
||||||
if len(this.arguments) != 0 {
|
if len(this.Arguments) != 0 {
|
||||||
t.Fatal("expected 0 arguments, got non-zero")
|
t.Fatal("expected 0 arguments, got non-zero")
|
||||||
}
|
}
|
||||||
if this.parseType != nil {
|
if this.parseType != nil {
|
||||||
|
|
Loading…
Reference in New Issue