(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func 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 | } |
nothing calls this directly
no test coverage detected