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:
parent
ce242a8796
commit
4eaced4092
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue