Revert "Merge pull request #100 from crquan/patch-1"
This reverts commitc6a969a0de, reversing changes made to3c5b048a9d.
This commit is contained in:
@@ -31,30 +31,3 @@ func TestQuoting(t *testing.T) {
|
||||
checkQuoting(false, errors.New("invalid"))
|
||||
checkQuoting(true, errors.New("invalid argument"))
|
||||
}
|
||||
|
||||
func TestTextPrint(t *testing.T) {
|
||||
tf := &TextFormatter{DisableColors: true}
|
||||
byts, _ := tf.Format(&Entry{Message: "msg content"})
|
||||
|
||||
// make sure no leading or trailing spaces
|
||||
if string(byts) !=
|
||||
"time=\"0001-01-01T00:00:00Z\" level=panic msg=\"msg content\"\n" {
|
||||
t.Errorf("not expected: %q", string(byts))
|
||||
}
|
||||
}
|
||||
|
||||
func TestColorPrint(t *testing.T) {
|
||||
tf := &TextFormatter{ForceColors: true}
|
||||
entry := WithField("testkey", "value")
|
||||
entry.Message = "msg content"
|
||||
byts, _ := tf.Format(entry)
|
||||
|
||||
// make sure no leading or trailing spaces
|
||||
if string(byts) !=
|
||||
"\x1b[31mPANI\x1b[0m[0000] " +
|
||||
// length 44 plus one space
|
||||
"msg content " +
|
||||
"\x1b[31mtestkey\x1b[0m=value\n" {
|
||||
t.Errorf("not expected: %q", string(byts))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user