MCPcopy
hub / github.com/rclone/rclone / TestInternalUrlEncode

Function TestInternalUrlEncode

backend/swift/swift_internal_test.go:13–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestInternalUrlEncode(t *testing.T) {
14 for _, test := range []struct {
15 in string
16 want string
17 }{
18 {"", ""},
19 {"abcdefghijklmnopqrstuvwxyz", "abcdefghijklmnopqrstuvwxyz"},
20 {"ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"},
21 {"0123456789", "0123456789"},
22 {"abc/ABC/123", "abc/ABC/123"},
23 {" ", "%20%20%20"},
24 {"&", "%26"},
25 {"ߣ", "%C3%9F%C2%A3"},
26 {"Vidéo Potato Sausage?&£.mkv", "Vid%C3%A9o%20Potato%20Sausage%3F%26%C2%A3.mkv"},
27 } {
28 got := urlEncode(test.in)
29 if got != test.want {
30 t.Logf("%q: want %q got %q", test.in, test.want, got)
31 }
32 }
33}
34
35func TestInternalShouldRetryHeaders(t *testing.T) {
36 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

LogfMethod · 0.80
urlEncodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…