MCPcopy
hub / github.com/dnote/dnote / TestDirs

Function TestDirs

pkg/dirs/dirs_unix_test.go:28–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26)
27
28func TestDirs(t *testing.T) {
29 home := Home
30 assert.NotEqual(t, home, "", "home is empty")
31
32 configHome := filepath.Join(home, ".config")
33 dataHome := filepath.Join(home, ".local", "share")
34 cacheHome := filepath.Join(home, ".cache")
35
36 testCases := []struct {
37 got string
38 expected string
39 }{
40 {
41 got: ConfigHome,
42 expected: configHome,
43 },
44 {
45 got: DataHome,
46 expected: dataHome,
47 },
48 {
49 got: CacheHome,
50 expected: cacheHome,
51 },
52 }
53
54 for _, tc := range testCases {
55 assert.Equal(t, tc.got, tc.expected, "result mismatch")
56 }
57}
58
59func TestCustomDirs(t *testing.T) {
60 testCases := []envTestCase{

Callers

nothing calls this directly

Calls 2

NotEqualFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected