diff --git a/src/Utilities.UnitTests/ToolTask_Tests.cs b/src/Utilities.UnitTests/ToolTask_Tests.cs index f683c61ca7d..3b5d3eb6085 100644 --- a/src/Utilities.UnitTests/ToolTask_Tests.cs +++ b/src/Utilities.UnitTests/ToolTask_Tests.cs @@ -681,19 +681,20 @@ public void FindOnPathSucceeds() { string[] expectedCmdPath; string shellName; + string cmdPath; if (NativeMethodsShared.IsWindows) { - expectedCmdPath = new[] { Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe") }; + expectedCmdPath = new[] { Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe").ToUpperInvariant() }; shellName = "cmd.exe"; + cmdPath = ToolTask.FindOnPath(shellName).ToUpperInvariant(); } else { expectedCmdPath = new[] { "/bin/sh", "/usr/bin/sh" }; shellName = "sh"; + cmdPath = ToolTask.FindOnPath(shellName); } - string cmdPath = ToolTask.FindOnPath(shellName); - cmdPath.ShouldBeOneOf(expectedCmdPath); }