(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestResolve_opencode(t *testing.T) { |
| 111 | // Test OpenCode provider resolution |
| 112 | got := mustResolve(t, "opencode", "", nil) |
| 113 | if got.Name() != "OpenCode" { |
| 114 | t.Errorf("Resolve(opencode) name = %q, want OpenCode", got.Name()) |
| 115 | } |
| 116 | if got.CLIPath() != "opencode" { |
| 117 | t.Errorf("Resolve(opencode) CLIPath = %q, want opencode", got.CLIPath()) |
| 118 | } |
| 119 | |
| 120 | // Test OpenCode with custom path |
| 121 | got = mustResolve(t, "opencode", "/usr/local/bin/opencode", nil) |
| 122 | if got.CLIPath() != "/usr/local/bin/opencode" { |
| 123 | t.Errorf("Resolve(opencode, /usr/local/bin/opencode) CLIPath = %q, want /usr/local/bin/opencode", got.CLIPath()) |
| 124 | } |
| 125 | |
| 126 | // Test from config |
| 127 | cfg := &config.Config{} |
| 128 | cfg.Agent.Provider = "opencode" |
| 129 | cfg.Agent.CLIPath = "/opt/opencode" |
| 130 | got = mustResolve(t, "", "", cfg) |
| 131 | if got.Name() != "OpenCode" { |
| 132 | t.Errorf("Resolve(_, _, config opencode) name = %q, want OpenCode", got.Name()) |
| 133 | } |
| 134 | if got.CLIPath() != "/opt/opencode" { |
| 135 | t.Errorf("Resolve(_, _, config opencode) CLIPath = %q, want /opt/opencode", got.CLIPath()) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | func TestResolve_cursor(t *testing.T) { |
| 140 | got := mustResolve(t, "cursor", "", nil) |
nothing calls this directly
no test coverage detected