Replacing all implicit msbuild parameters from using a forward slash to using a dash.

This commit is contained in:
Livar Cunha 2018-04-02 14:44:43 -07:00
parent 7c37c9a069
commit 10289504a8
33 changed files with 179 additions and 179 deletions

View file

@ -11,24 +11,24 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
public class GivenDotnetRestoreInvocation
{
private const string ExpectedPrefix =
"exec <msbuildpath> -m -v:m /nologo /t:Restore";
"exec <msbuildpath> -m -v:m -nologo -t:Restore";
[Theory]
[InlineData(new string[] { }, "")]
[InlineData(new string[] { "-s", "<source>" }, "/p:RestoreSources=<source>")]
[InlineData(new string[] { "--source", "<source>" }, "/p:RestoreSources=<source>")]
[InlineData(new string[] { "-s", "<source0>", "-s", "<source1>" }, "/p:RestoreSources=<source0>%3B<source1>")]
[InlineData(new string[] { "-r", "<runtime>" }, "/p:RuntimeIdentifiers=<runtime>")]
[InlineData(new string[] { "--runtime", "<runtime>" }, "/p:RuntimeIdentifiers=<runtime>")]
[InlineData(new string[] { "-r", "<runtime0>", "-r", "<runtime1>" }, "/p:RuntimeIdentifiers=<runtime0>%3B<runtime1>")]
[InlineData(new string[] { "--packages", "<packages>" }, "/p:RestorePackagesPath=<packages>")]
[InlineData(new string[] { "--disable-parallel" }, "/p:RestoreDisableParallel=true")]
[InlineData(new string[] { "--configfile", "<config>" }, "/p:RestoreConfigFile=<config>")]
[InlineData(new string[] { "--no-cache" }, "/p:RestoreNoCache=true")]
[InlineData(new string[] { "--ignore-failed-sources" }, "/p:RestoreIgnoreFailedSources=true")]
[InlineData(new string[] { "--no-dependencies" }, "/p:RestoreRecursive=false")]
[InlineData(new string[] { "-v", "minimal" }, @"/verbosity:minimal")]
[InlineData(new string[] { "--verbosity", "minimal" }, @"/verbosity:minimal")]
[InlineData(new string[] { "-s", "<source>" }, "-p:RestoreSources=<source>")]
[InlineData(new string[] { "--source", "<source>" }, "-p:RestoreSources=<source>")]
[InlineData(new string[] { "-s", "<source0>", "-s", "<source1>" }, "-p:RestoreSources=<source0>%3B<source1>")]
[InlineData(new string[] { "-r", "<runtime>" }, "-p:RuntimeIdentifiers=<runtime>")]
[InlineData(new string[] { "--runtime", "<runtime>" }, "-p:RuntimeIdentifiers=<runtime>")]
[InlineData(new string[] { "-r", "<runtime0>", "-r", "<runtime1>" }, "-p:RuntimeIdentifiers=<runtime0>%3B<runtime1>")]
[InlineData(new string[] { "--packages", "<packages>" }, "-p:RestorePackagesPath=<packages>")]
[InlineData(new string[] { "--disable-parallel" }, "-p:RestoreDisableParallel=true")]
[InlineData(new string[] { "--configfile", "<config>" }, "-p:RestoreConfigFile=<config>")]
[InlineData(new string[] { "--no-cache" }, "-p:RestoreNoCache=true")]
[InlineData(new string[] { "--ignore-failed-sources" }, "-p:RestoreIgnoreFailedSources=true")]
[InlineData(new string[] { "--no-dependencies" }, "-p:RestoreRecursive=false")]
[InlineData(new string[] { "-v", "minimal" }, @"-verbosity:minimal")]
[InlineData(new string[] { "--verbosity", "minimal" }, @"-verbosity:minimal")]
public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs)
{
expectedAdditionalArgs = (string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}");