From e538ccca779e170f30c027b8d623a22bb4664bdd Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Mon, 15 Oct 2018 10:48:48 -0400 Subject: [PATCH] Update PlatformIdentifier unit test --- .../Core/TestPlatformIdentifier.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestPlatformIdentifier.cs b/tests/Tgstation.Server.Host.Tests/Core/TestPlatformIdentifier.cs index 8e46e356c0..26d7459ed6 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestPlatformIdentifier.cs +++ b/tests/Tgstation.Server.Host.Tests/Core/TestPlatformIdentifier.cs @@ -10,7 +10,15 @@ namespace Tgstation.Server.Host.Core.Tests public void TestCorrectPlatform() { var identifier = new PlatformIdentifier(); - Assert.AreEqual(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), identifier.IsWindows); + + var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + const string WindowsScriptExtension = "bat"; + const string PosixScriptExtension = "sh"; + + + Assert.AreEqual(isWindows, identifier.IsWindows); + + Assert.AreEqual(isWindows ? WindowsScriptExtension : PosixScriptExtension, identifier.ScriptFileExtension); } } }