diff --git a/internal/shell/detect_other_test.go b/internal/shell/detect_other_test.go new file mode 100644 index 0000000..2c1be74 --- /dev/null +++ b/internal/shell/detect_other_test.go @@ -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) + } +} diff --git a/internal/shell/detect_test.go b/internal/shell/detect_test.go index ff73c9b..6c3421a 100644 --- a/internal/shell/detect_test.go +++ b/internal/shell/detect_test.go @@ -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) - } -}