Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions internal/shell/detect_other_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//go:build !windows

package shell

import "testing"

func TestParentShellProcess_NonWindows(t *testing.T) {
// On non-Windows, parentShellProcess is a no-op stub that returns "".
got := parentShellProcess()
if got != "" {
t.Fatalf("parentShellProcess() = %q, want empty string on non-Windows", got)
}
}

func TestPreferredPowerShell_NonWindows(t *testing.T) {
// On non-Windows, preferredPowerShell returns "powershell".
got := preferredPowerShell()
if got != "powershell" {
t.Fatalf("preferredPowerShell() = %q, want powershell on non-Windows", got)
}
}
15 changes: 0 additions & 15 deletions internal/shell/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,3 @@ func TestDetectShellVersion_Branches(t *testing.T) {
}
}

func TestParentShellProcess_NonWindows(t *testing.T) {
// On non-Windows, parentShellProcess is a no-op stub that returns "".
got := parentShellProcess()
if got != "" {
t.Fatalf("parentShellProcess() = %q, want empty string on non-Windows", got)
}
}

func TestPreferredPowerShell_NonWindows(t *testing.T) {
// On non-Windows, preferredPowerShell returns "powershell".
got := preferredPowerShell()
if got != "powershell" {
t.Fatalf("preferredPowerShell() = %q, want powershell on non-Windows", got)
}
}