From 25dcc8753f337469f6119e9f1f702ecf5b79eb1f Mon Sep 17 00:00:00 2001 From: ghorsington Date: Sun, 18 Jul 2021 15:56:48 +0300 Subject: [PATCH] Normalize newlines in test config parser --- BepInExTests/Configuration/LegacyTestConfigProvider.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BepInExTests/Configuration/LegacyTestConfigProvider.cs b/BepInExTests/Configuration/LegacyTestConfigProvider.cs index 8a6f9a1..e89e5a0 100644 --- a/BepInExTests/Configuration/LegacyTestConfigProvider.cs +++ b/BepInExTests/Configuration/LegacyTestConfigProvider.cs @@ -5,7 +5,13 @@ namespace BepInEx.Configuration.Tests { public class LegacyTestConfigProvider : LegacyConfigurationProvider { - public string FileContents { get; set; } + private string fileContents; + + public string FileContents + { + get => fileContents; + set => fileContents = value.Replace("\r\n", "\n"); + } public LegacyTestConfigProvider() : base("none") { @@ -13,7 +19,7 @@ namespace BepInEx.Configuration.Tests public override IEnumerable ReadAllLines() { - return FileContents.Split(Environment.NewLine); + return FileContents.Split("\n"); } public override void Save()