From dcce32597dee9bd34880bf1e7a42a328eaec13d1 Mon Sep 17 00:00:00 2001 From: Lynn Cyrin Date: Wed, 26 Jun 2019 20:37:17 -0700 Subject: [PATCH] avoid escapes! h/t @therealplato --- text_formatter_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text_formatter_test.go b/text_formatter_test.go index d04fbcd..99b5d8c 100644 --- a/text_formatter_test.go +++ b/text_formatter_test.go @@ -246,17 +246,17 @@ func TestPadLevelText(t *testing.T) { // Control: the level text should not be padded by default if val.paddedLevelText != "" && strings.Contains(logLineDefault, val.paddedLevelText) { - t.Errorf("log line \"%s\" should not contain the padded level text \"%s\" by default", logLineDefault, val.paddedLevelText) + t.Errorf("log line %q should not contain the padded level text %q by default", logLineDefault, val.paddedLevelText) } // Assertion: the level text should still contain the string representation of the level if !strings.Contains(strings.ToLower(logLineWithPadding), val.level.String()) { - t.Errorf("log line \"%s\" should contain the level text \"%s\" when padding is enabled", logLineWithPadding, val.level.String()) + t.Errorf("log line %q should contain the level text %q when padding is enabled", logLineWithPadding, val.level.String()) } // Assertion: the level text should be in its padded form now if val.paddedLevelText != "" && !strings.Contains(logLineWithPadding, val.paddedLevelText) { - t.Errorf("log line \"%s\" should contain the padded level text \"%s\" when padding is enabled", logLineWithPadding, val.paddedLevelText) + t.Errorf("log line %q should contain the padded level text %q when padding is enabled", logLineWithPadding, val.paddedLevelText) } })