MCPcopy Create free account
hub / github.com/exercism/cli / TestDefaultWorkspaceDir

Function TestDefaultWorkspaceDir

config/config_notwin_test.go:12–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestDefaultWorkspaceDir(t *testing.T) {
13 testCases := []struct {
14 cfg Config
15 expected string
16 }{
17 {
18 cfg: Config{OS: "darwin", Home: "/User/charlie", DefaultDirName: "apple"},
19 expected: "/User/charlie/Apple",
20 },
21 {
22 cfg: Config{OS: "linux", Home: "/home/bob", DefaultDirName: "banana"},
23 expected: "/home/bob/banana",
24 },
25 }
26
27 for _, tc := range testCases {
28 assert.Equal(t, tc.expected, DefaultWorkspaceDir(tc.cfg), fmt.Sprintf("Operating System: %s", tc.cfg.OS))
29 }
30}

Callers

nothing calls this directly

Calls 1

DefaultWorkspaceDirFunction · 0.85

Tested by

no test coverage detected