test \r and \n in message bodies

This commit is contained in:
Shivaram Lingamneni 2019-07-12 18:24:26 -04:00
parent d3f23f4ea7
commit 4ff9a1babb

@ -71,6 +71,10 @@ var decodetests = []testcode{
MakeMessage(nil, "", "LIST")},
{"list ",
MakeMessage(nil, "", "LIST")},
{"privmsg #darwin :command injection attempt \n:Nickserv PRIVMSG user :Please re-enter your password",
MakeMessage(nil, "", "PRIVMSG", "#darwin", "command injection attempt ")},
{"privmsg #darwin :command injection attempt \r:Nickserv PRIVMSG user :Please re-enter your password",
MakeMessage(nil, "", "PRIVMSG", "#darwin", "command injection attempt ")},
{"@time=2848 :dan-!d@localhost LIST \r\n",
MakeMessage(map[string]string{"time": "2848"}, "dan-!d@localhost", "LIST")},
}