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

Function TestDeleteCommand

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

Source from the content-addressed store, hash-verified

22}
23
24func TestDeleteCommand(t *testing.T) {
25 cmd := newCmd("root", "")
26 cmd.AddCmd(newCmd("child", ""))
27 assert.Equal(t, len(cmd.Children()), 1, "should include one child command")
28 cmd.DeleteCmd("child")
29 assert.Equal(t, len(cmd.Children()), 0, "should be empty")
30}
31
32func TestFindCmd(t *testing.T) {
33 cmd := newCmd("root", "")

Callers

nothing calls this directly

Calls 4

newCmdFunction · 0.85
ChildrenMethod · 0.80
AddCmdMethod · 0.45
DeleteCmdMethod · 0.45

Tested by

no test coverage detected