Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/install/mcp_install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
)
Expand Down Expand Up @@ -669,13 +670,14 @@ func TestMCPInstall_Run_RegistersWhenAbsent(t *testing.T) {
// pre-check. It accepts the common CLI output formats and rejects
// incidental mentions of "guild" inside command-value strings.
func TestScanForGuildEntry(t *testing.T) {
guildBin := filepath.Join(t.TempDir(), "guild")
cases := []struct {
name string
in string
want bool
wantPath string
}{
{"claude human", "guild: /usr/local/bin/guild mcp serve\n", true, "/usr/local/bin/guild"},
{"claude human", "guild: " + guildBin + " mcp serve\n", true, guildBin},
{"list marker", "- guild\n- other\n", true, ""},
{"bare token", "guild\n", true, ""},
{"mixed list", " * other\n * guild: /bin/guild\n", true, "/bin/guild"},
Expand Down