From 5fde67110e12ad96d8f507dfb4e9f5456e60f1e1 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Wed, 27 May 2020 15:00:25 -0500 Subject: [PATCH] 0 args tst --- command/alias_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command/alias_test.go b/command/alias_test.go index 3fc821b4f..3e1660d85 100644 --- a/command/alias_test.go +++ b/command/alias_test.go @@ -152,8 +152,15 @@ aliases: {"gh pr status", []string{"pr", "status"}, ""}, {"gh dne", []string{"dne"}, ""}, {"gh", []string{}, ""}, + {"", []string{}, ""}, } { - out, err := ExpandAlias(strings.Split(c.Args, " ")) + args := []string{} + if c.Args != "" { + args = strings.Split(c.Args, " ") + } + + out, err := ExpandAlias(args) + if err == nil && c.Err != "" { t.Errorf("expected error %s for %s", c.Err, c.Args) continue