MCPcopy
hub / github.com/abiosoft/ishell / TestAddCommand

Function TestAddCommand

command_test.go:17–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestAddCommand(t *testing.T) {
18 cmd := newCmd("root", "")
19 assert.Equal(t, len(cmd.Children()), 0, "should be empty")
20 cmd.AddCmd(newCmd("child", ""))
21 assert.Equal(t, len(cmd.Children()), 1, "should include one child command")
22}
23
24func TestDeleteCommand(t *testing.T) {
25 cmd := newCmd("root", "")

Callers

nothing calls this directly

Calls 3

newCmdFunction · 0.85
ChildrenMethod · 0.80
AddCmdMethod · 0.45

Tested by

no test coverage detected