6 "github.com/stretchr/testify/require"
9 func TestStopNameReadsTheNameOfASubagent(t *testing.T) {
10 testCases := []struct {
17 name: "a name after the command",
18 line: " /stop GreenOtter ",
23 name: "the command alone",
27 name: "the command with spaces only",
31 name: "a word that starts with the command",
32 line: "/stopGreenOtter",
36 line: "please /stop GreenOtter",
40 for _, tc := range testCases {
41 t.Run(tc.name, func(t *testing.T) {
42 agent, found := stopSubagentName(tc.line)
43 require.Equal(t, tc.found, found)
44 require.Equal(t, tc.agent, agent)