From 3ccbf4b8936f415eed75c81d6228984516dfcbff Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 12 May 2015 11:54:23 -0700 Subject: [PATCH] Fix newline assertion in TestJsonFormatted on mono --- csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs b/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs index da0d9eeff..3d4d03209 100644 --- a/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs +++ b/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs @@ -221,7 +221,8 @@ namespace Google.ProtocolBuffers Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(), new MessageFormatOptions() { FormattedOutput = true }, "application/json", ms); - Assert.AreEqual("{\r\n \"text\": \"a\",\r\n \"number\": 1\r\n}", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length)); + string expected = string.Format("{{{0} \"text\": \"a\",{0} \"number\": 1{0}}}", System.Environment.NewLine); + Assert.AreEqual(expected, Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length)); } [Test]