(t *testing.T, dir string)
| 23 | ) |
| 24 | |
| 25 | func stubHomeDir(t *testing.T, dir string) { |
| 26 | homeEnv := "HOME" |
| 27 | switch runtime.GOOS { |
| 28 | case "windows": |
| 29 | homeEnv = "USERPROFILE" |
| 30 | case "plan9": |
| 31 | homeEnv = "home" |
| 32 | } |
| 33 | t.Setenv(homeEnv, dir) |
| 34 | } |
| 35 | |
| 36 | func Test_NewCmdLogin(t *testing.T) { |
| 37 | tests := []struct { |
no outgoing calls
no test coverage detected