mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
server: fill ctx.Query correctly (#73)
This commit is contained in:
30
pkg/base/path_test.go
Normal file
30
pkg/base/path_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestPathSplitQuery(t *testing.T) {
|
||||
for _, ca := range []struct {
|
||||
a string
|
||||
b string
|
||||
c string
|
||||
}{
|
||||
{
|
||||
"test?a=b",
|
||||
"test",
|
||||
"a=b",
|
||||
},
|
||||
{
|
||||
"test",
|
||||
"test",
|
||||
"",
|
||||
},
|
||||
} {
|
||||
b, c := PathSplitQuery(ca.a)
|
||||
require.Equal(t, ca.b, b)
|
||||
require.Equal(t, ca.c, c)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user