From 760247a4ab4e280935c3d2bc0aaefa5ca649bd35 Mon Sep 17 00:00:00 2001 From: v2ray Date: Thu, 24 Mar 2016 23:36:06 +0800 Subject: [PATCH] fix log test for windows --- common/log/log_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/log/log_test.go b/common/log/log_test.go index 15f921c9a..f41564bb9 100644 --- a/common/log/log_test.go +++ b/common/log/log_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/v2ray/v2ray-core/common/serial" + "github.com/v2ray/v2ray-core/common/platform" v2testing "github.com/v2ray/v2ray-core/testing" "github.com/v2ray/v2ray-core/testing/assert" ) @@ -30,10 +31,10 @@ func TestStreamLogger(t *testing.T) { logger: log.New(buffer, "", 0), } Info("Test ", "Stream Logger", " Format") - assert.StringLiteral(string(buffer.Bytes())).Equals("[Info]Test Stream Logger Format\n") + assert.StringLiteral(string(buffer.Bytes())).Equals("[Info]Test Stream Logger Format" + platform.LineSeparator()) buffer.Reset() errorLogger = infoLogger Error("Test ", serial.StringLiteral("literal"), " Format") - assert.StringLiteral(string(buffer.Bytes())).Equals("[Error]Test literal Format\n") + assert.StringLiteral(string(buffer.Bytes())).Equals("[Error]Test literal Format" + platform.LineSeparator()) }