MCPcopy
hub / github.com/rclone/rclone / TestPath

Function TestPath

lib/transform/transform_test.go:20–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestPath(t *testing.T) {
21 for _, test := range []struct {
22 path string
23 want string
24 }{
25 {"", ""},
26 {"toe/toe/toe", "tictactoe/tictactoe/tictactoe"},
27 {"a/b/c", "tictaca/tictacb/tictacc"},
28 } {
29 ctx, err := newOptions("all,prefix=tac", "all,prefix=tic")
30 require.NoError(t, err)
31
32 got := Path(ctx, test.path, false)
33 assert.Equal(t, test.want, got)
34 }
35}
36
37func TestFileTagOnFile(t *testing.T) {
38 for _, test := range []struct {

Callers

nothing calls this directly

Calls 3

PathFunction · 0.85
newOptionsFunction · 0.70
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…