Explorar o código

Fix UnescapedPathString test

ManlyMarco %!s(int64=4) %!d(string=hai) anos
pai
achega
a34d0c6528
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      BepInExTests/Configuration/ConfigFileTests.cs

+ 1 - 2
BepInExTests/Configuration/ConfigFileTests.cs

@@ -298,6 +298,7 @@ namespace BepInEx.Configuration.Tests
 		public void UnescapedPathString()
 		public void UnescapedPathString()
 		{
 		{
 			var c = MakeConfig();
 			var c = MakeConfig();
+			var w = c.AddSetting("Cat", "Key", "", new ConfigDescription("Test"));
 
 
 			var unescaped = @"D:\test\p ath";
 			var unescaped = @"D:\test\p ath";
 			foreach (string testVal in new[] { unescaped, @"D:\\test\\p ath" })
 			foreach (string testVal in new[] { unescaped, @"D:\\test\\p ath" })
@@ -305,8 +306,6 @@ namespace BepInEx.Configuration.Tests
 				File.WriteAllText(c.ConfigFilePath, $"[Cat]\n# Test\nKey={testVal}\n");
 				File.WriteAllText(c.ConfigFilePath, $"[Cat]\n# Test\nKey={testVal}\n");
 				c.Reload();
 				c.Reload();
 
 
-				var w = c.AddSetting("Cat", "Key", "", new ConfigDescription("Test"));
-
 				Assert.AreEqual(unescaped, w.Value);
 				Assert.AreEqual(unescaped, w.Value);
 
 
 				w.SetSerializedValue(w.GetSerializedValue());
 				w.SetSerializedValue(w.GetSerializedValue());