From a479ac6cf084e0b006695d0fdbf4b2baba1c0a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Wed, 26 May 2021 10:58:38 +0200 Subject: [PATCH] Fix the `ComplexTypeWithAttributeGroupExtension` test on Linux and macOS On Linux and macOS, the generator writes with LF (instead of CRLF) so the normalization Regex was not matching `\r\n`. --- XmlSchemaClassGenerator.Tests/XmlTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XmlSchemaClassGenerator.Tests/XmlTests.cs b/XmlSchemaClassGenerator.Tests/XmlTests.cs index 6b3e1ae1..e9b7cedb 100644 --- a/XmlSchemaClassGenerator.Tests/XmlTests.cs +++ b/XmlSchemaClassGenerator.Tests/XmlTests.cs @@ -1410,7 +1410,7 @@ public void BoolTest() private static void CompareOutput(string expected, string actual) { - static string Normalize(string input) => Regex.Replace(input, @"[ \t]*\r\n", "\n"); + static string Normalize(string input) => Regex.Replace(input, @"[ \t]*\r?\n", "\n"); Assert.Equal(Normalize(expected), Normalize(actual)); }