fix the listen-addr test fails on unix 1️⃣

Former-commit-id: a953a0bf2f843f6da5d062dc0bd6cd561b7b10b2
This commit is contained in:
hiveminded 2017-07-22 23:10:20 +03:00
parent e1953fe91e
commit 6f8b802551

View File

@ -45,11 +45,13 @@ func TestListenAddr(t *testing.T) {
// println(len(log.Bytes()))
expected := fmt.Sprintln("\"" + iris.ErrServerClosed.Error() + "\" ")
expected = strings.TrimSpace(expected)
// println([]byte(expected))
// println(len([]byte(expected)))
got := log.String()
got = strings.Split(got, "msg=")[1]
got = strings.TrimSpace(got)
if expected != got {
t.Fatalf("expecting to log the:\n'%s'\ninstead of:\n'%s'", expected, got)
}