MCPcopy Create free account
hub / github.com/dim-an/cod / TestLearnListPathSelector

Function TestLearnListPathSelector

test/list_test.go:111–135  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestLearnListPathSelector(t *testing.T) {
112 wb := SetupWorkbench(t)
113 defer wb.Close()
114
115 shellPid := wb.LaunchFakeShell()
116
117 wb.RunCodCmd("init", strconv.Itoa(shellPid), "bash")
118
119 wb.RunCodCmd("learn", "--", "binaries/cat.py", "--help")
120 wb.RunCodCmd("learn", "--", "binaries/naval-fate.py", "--help")
121
122 abs, err := filepath.Abs("binaries/naval-fate.py")
123 require.Nil(t, err)
124
125 out := wb.RunCodCmd("list", abs)
126
127 commands := wb.ParseCodListCommands(out)
128
129 require.Equal(t,
130 []string{
131 "binaries/naval-fate.py --help",
132 },
133 commands,
134 )
135}
136
137func TestLearnListIdSelector(t *testing.T) {
138 wb := SetupWorkbench(t)

Callers

nothing calls this directly

Calls 5

SetupWorkbenchFunction · 0.85
LaunchFakeShellMethod · 0.80
RunCodCmdMethod · 0.80
ParseCodListCommandsMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected