MCPcopy Create free account
hub / github.com/bracesdev/errtrace / TestErrHelp

Function TestErrHelp

cmd/errtrace/main_test.go:25–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestErrHelp(t *testing.T) {
26 exitCode := (&mainCmd{
27 Stdin: strings.NewReader(""),
28 Stdout: testWriter{t},
29 Stderr: testWriter{t},
30 }).Run([]string{"-h"})
31 if want := 0; exitCode != want {
32 t.Errorf("exit code = %d, want %d", exitCode, want)
33 }
34}
35
36// TestGolden runs errtrace on all .go files inside testdata/golden,
37// and compares the output to the corresponding .golden file.

Callers

nothing calls this directly

Calls 1

RunMethod · 0.80

Tested by

no test coverage detected