MCPcopy Index your code
hub / github.com/commander-cli/commander / Test_AddCommand_AddToExisting

Function Test_AddCommand_AddToExisting

pkg/app/add_command_test.go:15–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13}
14
15func Test_AddCommand_AddToExisting(t *testing.T) {
16 existing := []byte(`
17tests:
18 echo exists:
19 exit-code: 0
20`)
21
22 content, err := AddCommand("echo hello", existing)
23
24 assert.Nil(t, err)
25 assert.Equal(t, "tests:\n echo exists:\n exit-code: 0\n echo hello:\n exit-code: 0\n stdout: hello\n", string(content))
26}
27
28func Test_AddCommand_AddToExistingWithComplexStdStreamAssertions(t *testing.T) {
29 existing := []byte(`

Callers

nothing calls this directly

Calls 1

AddCommandFunction · 0.85

Tested by

no test coverage detected