aboutsummaryrefslogtreecommitdiff
path: root/logic/cmd_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'logic/cmd_test.go')
-rw-r--r--logic/cmd_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/logic/cmd_test.go b/logic/cmd_test.go
index d7c88ba..78e9b41 100644
--- a/logic/cmd_test.go
+++ b/logic/cmd_test.go
@@ -11,6 +11,14 @@ func TestParseCmd(t *testing.T) {
t.Errorf("Parsing an empty string should return an error")
}
+ cmd, err = ParseCmd(" q \t ")
+ if err != nil {
+ t.Errorf("Parsing \" q \\t \" should not return \"%v\"", err)
+ }
+ if cmd.Cmd != "q" {
+ t.Errorf("Parsing \" q \\t \" should return \"q\" as command")
+ }
+
for _, s := range []string{"d", "p", "h"} {
cmd, err = ParseCmd(s)
if err != nil {