add some trailing parameter parsing tests

This commit is contained in:
Shivaram Lingamneni 2021-10-03 17:41:24 -04:00
parent dd73c4f862
commit 0e1b7ad1b9

@ -77,6 +77,14 @@ var decodetests = []testcode{
MakeMessage(nil, "", "LIST")},
{"@time=2848 :dan-!d@localhost LIST \r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "LIST")},
{"@time=2848 :dan-!d@localhost PRIVMSG a:b :\r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "PRIVMSG", "a:b", "")},
{"@time=2848 :dan-!d@localhost PRIVMSG a:b ::\r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "PRIVMSG", "a:b", ":")},
{"@time=2848 :dan-!d@localhost PRIVMSG a:b ::hi\r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "PRIVMSG", "a:b", ":hi")},
{"@time=2848 :dan-!d@localhost PRIVMSG a:b :hi\r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "PRIVMSG", "a:b", "hi")},
}
type testparseerror struct {