From 46f7ec7b12e6ff9ad50d3bdcd5a65d569a00ff30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:52:02 +0000 Subject: [PATCH 1/2] Initial plan From 01bdacc3c57c2f013f96880ec447d3eabbfff313 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:54:06 +0000 Subject: [PATCH 2/2] Move non-Windows shell tests to detect_other_test.go with !windows build tag Co-authored-by: kriserickson <325934+kriserickson@users.noreply.github.com> --- internal/shell/detect_other_test.go | 21 +++++++++++++++++++++ internal/shell/detect_test.go | 15 --------------- 2 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 internal/shell/detect_other_test.go 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) - } -}