Add more tests for commandparser
MODIFY
commands/command_test.go
commands/command_test.go
@@ -31,6 +31,14 @@ func TestParseCommand(t *testing.T) {
name: "no command, just whitespace",
input: " ",
want: nil,
+ }, {
+ name: "A command with a string where the quote in the end was forgotten",
+ input: "hello \"sunny world",
+ want: []string {"hello", "\"sunny", "world"},
+ }, {
+ name: "A command with a backslash in the end",
+ input: "hello world\\",
+ want: []string {"hello", "world\\"},
}, {
name: "just quoted whitespace",
input: "\" \"",

Add more tests for commandparser