MCPcopy Create free account
hub / github.com/cli/cli / stubHomeDir

Function stubHomeDir

pkg/cmd/auth/login/login_test.go:28–37  ·  view source on GitHub ↗
(t *testing.T, dir string)

Source from the content-addressed store, hash-verified

26)
27
28func stubHomeDir(t *testing.T, dir string) {
29 homeEnv := "HOME"
30 switch runtime.GOOS {
31 case "windows":
32 homeEnv = "USERPROFILE"
33 case "plan9":
34 homeEnv = "home"
35 }
36 t.Setenv(homeEnv, dir)
37}
38
39func Test_NewCmdLogin(t *testing.T) {
40 tests := []struct {

Callers 2

Test_loginRun_SurveyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected