Skip to content

Commit

Permalink
test: fix usage printing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmzane committed Feb 24, 2023
1 parent c905948 commit 227228f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion musttag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ func TestAnalyzer(t *testing.T) {

func TestFlags(t *testing.T) {
analyzer := New()
analyzer.Flags.SetOutput(io.Discard) // TODO(junk1tm): does not work, the usage is still printed.
analyzer.Flags.Usage = func() {}
analyzer.Flags.SetOutput(io.Discard)

t.Run("ok", func(t *testing.T) {
err := analyzer.Flags.Parse([]string{"-fn=test.Test:test:0"})
Expand Down

0 comments on commit 227228f

Please sign in to comment.