mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 18:04:55 +01:00
20 lines
395 B
Go
20 lines
395 B
Go
package gax
|
|
|
|
import "testing"
|
|
|
|
func TestXGoogHeader(t *testing.T) {
|
|
for _, tst := range []struct {
|
|
kv []string
|
|
want string
|
|
}{
|
|
{nil, ""},
|
|
{[]string{"abc", "def"}, "abc/def"},
|
|
{[]string{"abc", "def", "xyz", "123", "foo", ""}, "abc/def xyz/123 foo/"},
|
|
} {
|
|
got := XGoogHeader(tst.kv...)
|
|
if got != tst.want {
|
|
t.Errorf("Header(%q) = %q, want %q", tst.kv, got, tst.want)
|
|
}
|
|
}
|
|
}
|