diff --git a/flag_test.go b/flag_test.go index 58a5d25a..8de801c9 100644 --- a/flag_test.go +++ b/flag_test.go @@ -1238,8 +1238,8 @@ func TestPrintDefaults(t *testing.T) { fs.PrintDefaults() got := buf.String() if got != defaultOutput { - fmt.Println("\n" + got) - fmt.Println("\n" + defaultOutput) + fmt.Print("\n" + got + "\n") + fmt.Print("\n" + defaultOutput + "\n") t.Errorf("got %q want %q\n", got, defaultOutput) } }