MCPcopy
hub / github.com/valyala/fasthttp / TestArgsEscape

Function TestArgsEscape

args_test.go:194–208  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

192}
193
194func TestArgsEscape(t *testing.T) {
195 t.Parallel()
196
197 testArgsEscape(t, "foo", "bar", "foo=bar")
198
199 // Test all characters
200 k := "f.o,1:2/4"
201 v := make([]byte, 256)
202 for i := range 256 {
203 v[i] = byte(i)
204 }
205 u := url.Values{}
206 u.Add(k, string(v))
207 testArgsEscape(t, k, string(v), u.Encode())
208}
209
210func testArgsEscape(t *testing.T, k, v, expectedS string) {
211 var a Args

Callers

nothing calls this directly

Calls 2

testArgsEscapeFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…