From 6f8b80255133b8ea2f6cd0c585782cd438cb2ee5 Mon Sep 17 00:00:00 2001 From: hiveminded Date: Sat, 22 Jul 2017 23:10:20 +0300 Subject: [PATCH] fix the listen-addr test fails on unix :one: Former-commit-id: a953a0bf2f843f6da5d062dc0bd6cd561b7b10b2 --- .../http-listening/listen-addr/omit-server-errors/main_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_examples/http-listening/listen-addr/omit-server-errors/main_test.go b/_examples/http-listening/listen-addr/omit-server-errors/main_test.go index 21d9e1bb..0a6b541f 100644 --- a/_examples/http-listening/listen-addr/omit-server-errors/main_test.go +++ b/_examples/http-listening/listen-addr/omit-server-errors/main_test.go @@ -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) }