(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestDetectShell_Unix(t *testing.T) { |
| 37 | if runtime.GOOS == "windows" { |
| 38 | t.Skip("Unix-only test") |
| 39 | } |
| 40 | |
| 41 | t.Setenv("SHELL", "/bin/zsh") |
| 42 | shell, args := DetectShell() |
| 43 | if shell != "/bin/zsh" { |
| 44 | t.Errorf("DetectShell() shell = %q, want /bin/zsh", shell) |
| 45 | } |
| 46 | if len(args) != 1 || args[0] != "-c" { |
| 47 | t.Errorf("DetectShell() args = %v, want [-c]", args) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func TestDetectShell_Unix_Fallback(t *testing.T) { |
| 52 | if runtime.GOOS == "windows" { |
nothing calls this directly
no test coverage detected