test(setup): use filepath.Join in TestGeminiSettingsPaths assertions (#3555)

Test hardcoded forward-slash path literals against output from
filepath.Join, so it failed on Windows even though the production
code (geminiProjectSettingsPath, geminiGlobalSettingsPath) was
correct.

Matches the existing pattern from TestMuxProjectAgentsPath and
TestMuxGlobalAgentsPath in the same package, which compare
filepath.Join(...) on both sides.

Fixes #3554
This commit is contained in:
seanmartinsmith 2026-05-08 11:20:11 -04:00 • committed by GitHub
commit 4eaced4092
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -468,12 +468,12 @@ func TestHasGeminiBeadsHooks(t *testing.T) {
func TestGeminiSettingsPaths(t *testing.T) {
projectPath := geminiProjectSettingsPath("/my/project")
if projectPath != "/my/project/.gemini/settings.json" {
t.Errorf("unexpected project path: %s", projectPath)
if want := filepath.Join("/my/project", ".gemini", "settings.json"); projectPath != want {
t.Errorf("project path = %q, want %q", projectPath, want)
}
globalPath := geminiGlobalSettingsPath("/home/user")
if globalPath != "/home/user/.gemini/settings.json" {
t.Errorf("unexpected global path: %s", globalPath)
if want := filepath.Join("/home/user", ".gemini", "settings.json"); globalPath != want {
t.Errorf("global path = %q, want %q", globalPath, want)
}
}