Fixed subcommands test

This commit is contained in:
diamondburned (Forefront) 2020-01-23 19:22:24 -08:00
parent aadcbd0767
commit 97b8d4f54e
1 changed files with 4 additions and 4 deletions

View File

@ -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 {