base: add tests

This commit is contained in:
aler9
2021-04-12 14:25:22 +02:00
parent 2e5aef4c12
commit d050001b58
2 changed files with 32 additions and 18 deletions

View File

@@ -177,9 +177,17 @@ func TestRequestReadErrors(t *testing.T) {
"missing eol",
[]byte("GET rtsp://testing123/test RTSP/1.0"),
},
{
"empty method",
[]byte(" rtsp://testing123 RTSP/1.0\r\n"),
},
{
"empty URL",
[]byte("GET http://testing123 RTSP/1.0\r\n"),
[]byte("GET RTSP/1.0\r\n"),
},
{
"empty protocol",
[]byte("GET http://testing123 \r\n"),
},
{
"invalid URL",