test: avoid duplication in windows config path test
This commit is contained in:
parent
7a0a9ac6bb
commit
0d63e18880
1 changed files with 3 additions and 2 deletions
|
|
@ -83,10 +83,11 @@ func TestGetConfigPath_Windows(t *testing.T) {
|
||||||
t.Skip("windows-specific HOME behavior varies; run on windows")
|
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()
|
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)
|
require.True(t, strings.EqualFold(got, want), "GetConfigPath() = %q, want %q", got, want)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue