Files
gortsplib/pkg/base/path_test.go
2021-09-23 08:53:10 +02:00

31 lines
365 B
Go

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)
}
}