MCPcopy
hub / github.com/openpubkey/opkssh / TestInspectCmdPrintf

Function TestInspectCmdPrintf

commands/inspect_test.go:20–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18)
19
20func TestInspectCmdPrintf(t *testing.T) {
21 buf := new(bytes.Buffer)
22 inspect := NewInspectCmd("foo", buf)
23 inspect.printf("Answer: %d", 42)
24
25 output := buf.String()
26 require.Contains(t, output, "Answer: 42")
27}
28
29func TestInspectCmdJson(t *testing.T) {
30 inputString := `{"name":"test","options":["one","two"]}`

Callers

nothing calls this directly

Calls 3

printfMethod · 0.95
NewInspectCmdFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected