test: avoid duplication in windows config path test

This commit is contained in:
Ruslan Semagin 2026-02-24 08:32:41 +03:00
parent 7a0a9ac6bb
commit 0d63e18880

View file

@ -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)
}