MCPcopy Create free account
hub / github.com/checkmake/checkmake / TestCheckmake_NoArgsShowsHelp

Function TestCheckmake_NoArgsShowsHelp

cmd/checkmake/main_test.go:39–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestCheckmake_NoArgsShowsHelp(t *testing.T) {
40 out := captureOutput(func() {
41 cmd := newRootCmd()
42 cmd.SetArgs([]string{}) // no args
43 err := cmd.Execute()
44 require.NoError(t, err, "command without args should not fail")
45 })
46
47 assert.Contains(t, out, "Usage:", "expected help output to be shown")
48 assert.Contains(t, out, "checkmake [flags]", "should display root usage line")
49}
50
51func TestCheckmake_VersionOutput(t *testing.T) {
52 out := captureOutput(func() {

Callers

nothing calls this directly

Calls 2

captureOutputFunction · 0.85
newRootCmdFunction · 0.85

Tested by

no test coverage detected