From 0d63e18880b3f5dd9b298de0d83197a0e859d6a6 Mon Sep 17 00:00:00 2001 From: Ruslan Semagin Date: Tue, 24 Feb 2026 08:32:41 +0300 Subject: [PATCH] test: avoid duplication in windows config path test --- cmd/picoclaw/internal/helpers_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/picoclaw/internal/helpers_test.go b/cmd/picoclaw/internal/helpers_test.go index 22a802537..e24558c2a 100644 --- a/cmd/picoclaw/internal/helpers_test.go +++ b/cmd/picoclaw/internal/helpers_test.go @@ -83,10 +83,11 @@ func TestGetConfigPath_Windows(t *testing.T) { t.Skip("windows-specific HOME behavior varies; run on windows") } - t.Setenv("USERPROFILE", `C:\Users\Test`) + testUserProfilePath := `C:\Users\Test` + t.Setenv("USERPROFILE", testUserProfilePath) got := GetConfigPath() - want := filepath.Join(`C:\Users\Test`, ".picoclaw", "config.json") + want := filepath.Join(testUserProfilePath, ".picoclaw", "config.json") require.True(t, strings.EqualFold(got, want), "GetConfigPath() = %q, want %q", got, want) }