mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
server: add more test cases
This commit is contained in:
@@ -22,16 +22,16 @@ func TestServerConnReadSetupPath(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
"normal",
|
||||
"rtsp://localhost:8554/teststream/trackID=0",
|
||||
"teststream",
|
||||
0,
|
||||
},
|
||||
{
|
||||
"unordered id",
|
||||
"rtsp://localhost:8554/teststream/trackID=2",
|
||||
"teststream",
|
||||
2,
|
||||
},
|
||||
{
|
||||
"with query",
|
||||
"rtsp://localhost:8554/teststream?testing=123/trackID=4",
|
||||
"teststream",
|
||||
4,
|
||||
},
|
||||
{
|
||||
// this is needed to support reading mpegts with ffmpeg
|
||||
"without track id",
|
||||
@@ -51,6 +51,12 @@ func TestServerConnReadSetupPath(t *testing.T) {
|
||||
"test/stream",
|
||||
0,
|
||||
},
|
||||
{
|
||||
"subpath with query",
|
||||
"rtsp://localhost:8554/test/stream?testing=123/trackID=4",
|
||||
"test/stream",
|
||||
4,
|
||||
},
|
||||
} {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
type pathTrackIDPair struct {
|
||||
|
Reference in New Issue
Block a user