diff --git a/src/dotnet/commands/dotnet-test/Program.cs b/src/dotnet/commands/dotnet-test/Program.cs index 0e2fca247..a00055452 100644 --- a/src/dotnet/commands/dotnet-test/Program.cs +++ b/src/dotnet/commands/dotnet-test/Program.cs @@ -253,7 +253,6 @@ namespace Microsoft.DotNet.Tools.Test private static string[] GetRunSettingsOptions(List remainingArgs) { - int counter = 0; List runsettingsArgs = new List(); List argsToRemove = new List(); @@ -280,5 +279,26 @@ namespace Microsoft.DotNet.Tools.Test return string.IsNullOrEmpty(arg) ? arg : arg.Replace(";", "%3b"); } + private static string[] GetSemiColonEscapedArgs(List args) + { + int counter = 0; + string[] array = new string[args.Count]; + + foreach (string arg in args) + { + if (arg.IndexOf(";") != -1) + { + array[counter] = arg.Replace(";", "%3b"); + } + else + { + array[counter] = arg; + } + + counter++; + } + + return array; + } } } diff --git a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs index 39f42005f..61229afd8 100644 --- a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs +++ b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs @@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests [Fact] public void TestWillCreateTrxLogger() - { + { // Copy VSTestDotNetCore project in output directory of project dotnet-vstest.Tests string testAppName = "VSTestDotNetCore"; TestInstance testInstance = TestAssetsManager.CreateTestInstance(testAppName); @@ -170,7 +170,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests .ExecuteWithCapturedOutput("--logger \"trx;logfilename=custom.trx\" -- RunConfiguration.ResultsDirectory=" + trxLoggerDirectory); // Verify - String[] trxFiles = Directory.GetFiles(trxLoggerDirectory, "*.trx"); + String[] trxFiles = Directory.GetFiles(trxLoggerDirectory, "custom.trx"); Assert.Equal(1, trxFiles.Length); result.StdOut.Should().Contain(trxFiles[0]);