Added method GetSemiColonEscapedArgs
This commit is contained in:
parent
245727183c
commit
19d919a640
2 changed files with 23 additions and 3 deletions
|
@ -253,7 +253,6 @@ namespace Microsoft.DotNet.Tools.Test
|
|||
|
||||
private static string[] GetRunSettingsOptions(List<string> remainingArgs)
|
||||
{
|
||||
int counter = 0;
|
||||
List<string> runsettingsArgs = new List<string>();
|
||||
List<string> argsToRemove = new List<string>();
|
||||
|
||||
|
@ -280,5 +279,26 @@ namespace Microsoft.DotNet.Tools.Test
|
|||
return string.IsNullOrEmpty(arg) ? arg : arg.Replace(";", "%3b");
|
||||
}
|
||||
|
||||
private static string[] GetSemiColonEscapedArgs(List<string> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue