MCPcopy Index your code
hub / github.com/rclone/rclone / TestEncodeSet

Function TestEncodeSet

lib/encoder/encoder_test.go:40–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestEncodeSet(t *testing.T) {
41 for _, test := range []struct {
42 in string
43 want MultiEncoder
44 wantErr bool
45 }{
46 {"", 0, true},
47 {"Raw", EncodeRaw, false},
48 {"None", EncodeZero, false},
49 {"DoubleQuote", EncodeDoubleQuote, false},
50 {"Dot", EncodeDot, false},
51 {"LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe", EncodeWin, false},
52 {"Hash,Percent", EncodeHashPercent, false},
53 {"Slash,Dollar,Colon", EncodeSlash | EncodeDollar | EncodeColon, false},
54 {"Slash,0x80000000", EncodeSlash | (1 << 31), false},
55 {"Blerp", 0, true},
56 {"0xFGFFF", 0, true},
57 } {
58 var got MultiEncoder
59 err := got.Set(test.in)
60 assert.Equal(t, test.wantErr, err != nil, err)
61 assert.Equal(t, test.want, got, test.in)
62 }
63
64}
65
66type testCase struct {
67 mask MultiEncoder

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…