(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestPrintUsage(t *testing.T) { |
| 28 | buf := bytes.Buffer{} |
| 29 | f := setUpPFlagSet(&buf) |
| 30 | f.PrintDefaults() |
| 31 | res := buf.String() |
| 32 | if res != expectedOutput { |
| 33 | t.Errorf("Expected \n%s \nActual \n%s", expectedOutput, res) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func setUpPFlagSet2(buf io.Writer) *FlagSet { |
| 38 | f := NewFlagSet("test", ExitOnError) |
nothing calls this directly
no test coverage detected