MCPcopy Create free account
hub / github.com/52funny/pikpakcli / TestExpandLocalPath

Function TestExpandLocalPath

internal/utils/path_test.go:55–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestExpandLocalPath(t *testing.T) {
56 home, err := os.UserHomeDir()
57 require.NoError(t, err)
58
59 require.Equal(t, home, ExpandLocalPath("~"))
60 require.Equal(t, filepath.Join(home, "Downloads"), ExpandLocalPath("~/Downloads"))
61 require.Equal(t, filepath.Join(home, "Downloads"), ExpandLocalPath("$HOME/Downloads"))
62 require.Equal(t, "relative/path", ExpandLocalPath("relative/path"))
63}

Callers

nothing calls this directly

Calls 1

ExpandLocalPathFunction · 0.85

Tested by

no test coverage detected