Browse Source

avoid escapes! h/t @therealplato

pull/977/head
Lynn Cyrin 5 months ago
parent
commit
dcce32597d
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      text_formatter_test.go

+ 3
- 3
text_formatter_test.go View File

@@ -246,17 +246,17 @@ func TestPadLevelText(t *testing.T) {
246 246
 
247 247
 			// Control: the level text should not be padded by default
248 248
 			if val.paddedLevelText != "" && strings.Contains(logLineDefault, val.paddedLevelText) {
249
-				t.Errorf("log line \"%s\" should not contain the padded level text \"%s\" by default", logLineDefault, val.paddedLevelText)
249
+				t.Errorf("log line %q should not contain the padded level text %q by default", logLineDefault, val.paddedLevelText)
250 250
 			}
251 251
 
252 252
 			// Assertion: the level text should still contain the string representation of the level
253 253
 			if !strings.Contains(strings.ToLower(logLineWithPadding), val.level.String()) {
254
-				t.Errorf("log line \"%s\" should contain the level text \"%s\" when padding is enabled", logLineWithPadding, val.level.String())
254
+				t.Errorf("log line %q should contain the level text %q when padding is enabled", logLineWithPadding, val.level.String())
255 255
 			}
256 256
 
257 257
 			// Assertion: the level text should be in its padded form now
258 258
 			if val.paddedLevelText != "" && !strings.Contains(logLineWithPadding, val.paddedLevelText) {
259
-				t.Errorf("log line \"%s\" should contain the padded level text \"%s\" when padding is enabled", logLineWithPadding, val.paddedLevelText)
259
+				t.Errorf("log line %q should contain the padded level text %q when padding is enabled", logLineWithPadding, val.paddedLevelText)
260 260
 			}
261 261
 
262 262
 		})

Loading…
Cancel
Save