(t *testing.T)
| 15 | } |
| 16 | |
| 17 | func TestWindowsCmdExe_SystemRoot(t *testing.T) { |
| 18 | t.Setenv("ComSpec", "") |
| 19 | t.Setenv("SystemRoot", `C:\Windows`) |
| 20 | got := WindowsCmdExe() |
| 21 | want := `C:\Windows` + string(filepath.Separator) + filepath.Join("System32", "cmd.exe") |
| 22 | if got != want { |
| 23 | t.Errorf("WindowsCmdExe() = %q, want %q", got, want) |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestWindowsCmdExe_Fallback(t *testing.T) { |
| 28 | t.Setenv("ComSpec", "") |
nothing calls this directly
no test coverage detected