(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestDetectShellFallback(t *testing.T) { |
| 97 | t.Run("returns valid shell or error", func(t *testing.T) { |
| 98 | shell, err := detectShell() |
| 99 | |
| 100 | if runtime.GOOS == "windows" { |
| 101 | // Windows might error if no PowerShell available |
| 102 | if err == nil && shell == nil { |
| 103 | t.Error("Should not return nil shell without error") |
| 104 | } |
| 105 | } else { |
| 106 | // Unix should always succeed |
| 107 | if err != nil { |
| 108 | t.Errorf("Unix should not error: %v", err) |
| 109 | } |
| 110 | if shell == nil { |
| 111 | t.Error("Unix should never return nil shell") |
| 112 | } |
| 113 | } |
| 114 | }) |
| 115 | } |
| 116 | |
| 117 | func TestSetEnvironmentVariable(t *testing.T) { |
| 118 | tests := []struct { |
nothing calls this directly
no test coverage detected