代码拉取完成,页面将自动刷新
package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetCanonicalization(t *testing.T) {
vals := map[string][]string{
"user.name": []string{"Pat Doe"},
"branch.MixedCase.pushremote": []string{"Somewhere"},
"http.https://example.com/BIG-TEXT.git.extraheader": []string{"X-Foo: Bar"},
}
fetcher := GitFetcher{vals: vals}
assert.Equal(t, []string{"Somewhere"}, fetcher.GetAll("bRanch.MixedCase.pushRemote"))
assert.Equal(t, []string{"Somewhere"}, fetcher.GetAll("branch.MixedCase.pushremote"))
assert.Equal(t, []string(nil), fetcher.GetAll("branch.mixedcase.pushremote"))
assert.Equal(t, []string{"Pat Doe"}, fetcher.GetAll("user.name"))
assert.Equal(t, []string{"Pat Doe"}, fetcher.GetAll("User.Name"))
assert.Equal(t, []string{"X-Foo: Bar"}, fetcher.GetAll("http.https://example.com/BIG-TEXT.git.extraheader"))
assert.Equal(t, []string{"X-Foo: Bar"}, fetcher.GetAll("http.https://example.com/BIG-TEXT.git.extraHeader"))
assert.Equal(t, []string(nil), fetcher.GetAll("http.https://example.com/big-text.git.extraHeader"))
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。