diff --git a/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs b/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs index c9c4a1e..0df8b4d 100644 --- a/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs +++ b/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs @@ -361,7 +361,8 @@ public void TestCommentRoundtripWithModel() [[array]] # a comment after a table array key2 = 3 # This is a comment after a key -"; +".ReplaceLineEndings(); + StandardTests.DisplayHeader("input"); Console.WriteLine(input); var model = Toml.ToModel(input); diff --git a/src/Tomlyn.Tests/SerializationTests.cs b/src/Tomlyn.Tests/SerializationTests.cs index 213707a..b582364 100644 --- a/src/Tomlyn.Tests/SerializationTests.cs +++ b/src/Tomlyn.Tests/SerializationTests.cs @@ -2,6 +2,7 @@ // Licensed under the BSD-Clause 2 license. // See license.txt file in the project root for full license information. +using System; using NUnit.Framework; using Tomlyn.Model; @@ -23,7 +24,7 @@ public void TestCrlfInMultilineString() model["property"] = "string\r\nwith\r\nnewlines"; - Assert.AreEqual("property = '''string\r\nwith\r\nnewlines'''\r\n", Toml.FromModel(model)); + Assert.AreEqual("property = '''string\r\nwith\r\nnewlines'''" + Environment.NewLine, Toml.FromModel(model)); } } } \ No newline at end of file diff --git a/src/Tomlyn.Tests/TomlTests.cs b/src/Tomlyn.Tests/TomlTests.cs index 7970a20..878e2b5 100644 --- a/src/Tomlyn.Tests/TomlTests.cs +++ b/src/Tomlyn.Tests/TomlTests.cs @@ -34,7 +34,8 @@ public void TestDescendants() test.sub.key = ""yes"" [[array]] hello = true -"; +".ReplaceLineEndings("\r\n"); + var tokens = Toml.Parse(input).Tokens().ToList(); var builder = new StringBuilder(); foreach (var node in tokens)